Got it! I don't know how I didn't see it, but everything was already fine, but... The base Oracle Makefile for the gnump component (because it's designed to build with studio), runs ELFEDIT at postinstall!...removing my gcc paths :) Thanx for all your help! .... # libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH ELFEDIT = /usr/bin/elfedit .... COMPONENT_POST_INSTALL_ACTION = \ ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \ $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \ $(MKDIR) $(PROTOPKGCONFIGDIR) ; \ $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \ $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR)" \ $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \ $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR64)" \ $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \ $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR)" \ $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \ $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR64)" \ $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \ ---------------------------------------------------------------------------------- Da: Norm Jacobs A: pkg-discuss@opensolaris.org Data: 6 dicembre 2012 1.12.00 CET Oggetto: Re: [pkg-discuss] pkgdepend help You want to start by building libgmpxx.so with the correct RUNPATH and not by telling pkgdepend where it might augment it's search path for libgmpxx.so. With the right RUNPATH, pkgdepend should find libstdc++.so.6 without any hints. libtool and friends seem to link once when you build with references to your workspace so that you can run bits in place and re-links those bits when you install. When you initially build the bits, you should see something like: /bin/bash ./libtool --mode=link /usr/sfw/bin/g++ -O2 -pedantic -m64 -mtune=k8 -o libgmpxx.la -rpath /usr/lib -version-info 5:2:1 dummy.lo cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la When you install the bits, you should see something like: /bin/bash ./libtool --mode=install /usr/bin/ginstall -c 'libgmpxx.la' '/builds/jacobs/ul-test/components/gnump/build/prototype/i386/usr/lib/libgmpxx.la' libtool: install: warning: relinking `libgmpxx.la' (cd /builds/jacobs/ul-test/components/gnump/build/i86; /bin/bash ./libtool --mode=relink /usr/sfw/bin/g++ -O2 -pedantic -m64 -mtune=k8 -o libgmpxx.la -rpath /usr/lib -version-info 5:2:1 dummy.lo cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la -inst-prefix-dir /builds/jacobs/ul-test/components/gnump/build/prototype/i386) At a minimum, your Makefile should probably set COMPILER=gcc and pass the following into the configure environment CONFIGURE_ENV += CC="$(CC)" CONFIGURE_ENV += CXX="$(CXX)" CONFIGURE_ENV += CFLAGS="$(CFLAGS)" CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)" CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)" CONFIGURE_ENV += ABI="$(BITS)" There are perhaps others that you may play with. Using LD, LDFLAGS, CXXLD, CXXLDFLAGS, ... should be done with caution, particularly when setting LD or CXXLD to /usr/bin/ld since you will end up missing all of the compiler goodness ('-R /usr/sfw/lib' for example) that it would normally pass on to the linker when driven by the compiler. -Norm On 12/ 5/12 01:31 PM, Gabriele Bulfon wrote: Ok, I dumped the output of gmake publish and found the lines of linkage: /bin/bash ./libtool --mode=link /usr/sfw/bin/g++ -m32 -R/usr/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/sfw/lib -o libgmpxx.la -rpath /usr/lib -R/usr/sfw/lib -L/usr/sfw/lib -version-info 5:2:1 dummy.lo cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la /usr/sfw/bin/g++ -shared -nostdlib /usr/lib/crti.o /usr/lib/values-Xa.o /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/crtbegin.o .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o -Wl,-R -Wl,/sources/userlands/xstream-userland-gate/components/gnump/build/i86/.libs -Wl,-R -Wl,/usr/sfw/lib -Wl,-R -Wl,/usr/sfw/lib -L/usr/sfw/lib ./.libs/libgmp.so -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3 -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/../../.. /usr/sfw/lib/libstdc++.so -lm -lgcc_s /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/crtend.o /usr/lib/crtn.o -m32 -Wl,-h -Wl,libgmpxx.so.4 -o .libs/libgmpxx.so.4.1.2 Looks like the /usr/sfw/lib are there, but maybe something is superseding? I noticed the "-rpath" in libtool... ---------------------------------------------------------------------------------- Da: Danek Duvall A: Gabriele Bulfon Cc: pkg-discuss@opensolaris.org Data: 5 dicembre 2012 18.23.44 CET Oggetto: Re: [pkg-discuss] pkgdepend help Gabriele Bulfon wrote: Hi, I hope you can help me with an issue with pkgdepend. I'm trying to work out our own userland for XStreamOS, similar to the way illumos-userland does, derived from Oracle one. Some of the components (at the moment I'm working on having gnump+gnupg+mpfr to be able to package gcc45) have dependencies from the libgcc and libstdc++ I'm using. Because I still have no gcc45, I'm using gcc3 preinstalled inside /usr/sfw/*. I could make build run fine, but then pkgdepend cannot resolve these dependencies: /sources/userlands/xstream-userland-gate/components/gnump/build/manifest-i386-gmp.depend has unresolved dependency ' depend type=require fmri=__TBD pkg.debug.depend.file=libstdc++.so.6 \ pkg.debug.depend.reason=usr/lib/libgmpxx.so.4.1.2 \ pkg.debug.depend.type=elf \ pkg.debug.depend.path=lib \ pkg.debug.depend.path=usr/lib'. As far as I can see, the problem is because pkgdepend is looking for path usr/lib and not usr/sfw/lib, so it can't find any package in my system delivering that path file. Do you have any idea how pkgdepend decides these dependency paths? Examining the built libgmpxx.so.4.1.2 with ldd, it correctly says it depends from /usr/sfw/lib files. Searching for libstdc++.so.6 via pkg search on my build system, finds pkg:/system/library/gcc-3-runtime delivering the correct file /usr/sfw/lib/libstdc++.so.6. Why pkgdepend cannot see this? Be careful with using ldd -- it does a full traversal of the objects brough in by the ELF dependencies, and isn't as strict as pkgdepend, which looks just at each individual object, one at a time. So what it looks like is that yousr libgmpxx has a RUNPATH of /lib:/usr/lib and so won't find libstdc++.so.6, even though something else might pull it in for it. Check the output of elfdump -d libgmpxx.so.4.1.2 and you'll see. You'll need to link libgmpxx with "-R /usr/sfw/lib". If elfdump shows /usr/sfw/lib in the RUNPATH, then I'm not sure what could be going on. Danek _______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss _______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss