Hi, I know you want to tell me to use jhbuild to compile gtk+-3 and friends, but I don't like such tools and I tried to do my own build which worked quite fine until I encountered small errors during the build of gtk+-3 itself, when programs, linked during the build later got called from the build. There where two of such programs I detected: gtk/gtk-query-immodules-3.0 and as I compiled with --enable-gtk-doc --enable-man: docs/reference/gtk/gtk3-scan which is a temporary executable done by gtkdoc tools. The problem with both of those programs was, that the libtool link wrapper had build a LD_LIBRARY_PATH that contained the system directory "/usr/lib64" before "$prefix/lib", as it found as a sub-dependency of the local gtk-x11.la and gdk-x11.la, some global .la files such as libXinerama.la, before the more local ones libpangocairo*.la for example. And that how the LD_LIBRARY_PATH of the wrapper has been built, not obeying the link order given by -L and -R flags, that have been calculated in the right order. Luckily libtool-2.4.1a from libtool git master, had a newlib_search_path constructed at the time the wrapper is built, that contains the whitespace seperated list of -L and -R paths arguments, so that I could do a quick fix with a little sed, to strip the leading space and tr to convert spaces into a colon. As I hope this helps you further, I want to provide that patch against libtool, and I hope that it will make into libtool development or is a good anchor point to modify libtool in a different way. I will be glad too if you, dedicated developers of gtk+ and libtool would make your comments on it and discuss that patch with me and the possibilities to do it else, as the building of LD_LIBRARY_PATHs for the wrappers seems to me as a severe and long-term problem of libtool. Anyway with this patch the gtk+-3 trunk compilation works like charme here, with simple autogen.sh, make, make install commands: # this is what I use to configure. # INSTPATH can be set as preferred PATH=$INSTPATH/bin:$PATH PKG_CONFIG_PATH="$INSTPATH/lib/pkgconfig" export PKG_CONFIG_PATH PATH export INSTPATH LD_LIBRARY_PATH="${INSTPATH}/lib" export LD_LIBRARY_PATH export ACLOCAL_FLAG="-I $INSTPATH/share/aclocal" ./autogen.sh --prefix="${INSTPATH}" --enable-gtk-doc --enable-man bye ingo -- i don't do signatures
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 0418007..13fbe05 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -4356,6 +4356,10 @@ func_mode_link () xrpath= perm_rpath= temp_rpath= + nl_add= # nl_add will contain a converted newlib_search_path + # to be added to temp_rpath for the wrapper + abs_base=$(cd `dirname $0` && pwd) # this is used to check if a path is + # relative to our build directory thread_safe=no vinfo= vinfo_number=no @@ -5839,6 +5843,15 @@ func_mode_link () test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # quick and dirty patch to obey -L and -R options in the wrapper + # script + if [ -z "$nl_add" ]; then case "$absdir" in + *"$abs_base"*) ;; # when we leave the build base + *) # we will simply add newlib_search_path + nl_add=$(printf "$newlib_search_path"| sed -e "s/ *\(.*\)$/\1/"|tr \\040 :) + temp_rpath+="$nl_add:" + ;; + esac fi # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;;
Attachment:
pgpkWn2vqpNq8.pgp
Description: PGP signature