Hi, I cloned a fresh xen-unstable tree and did: # ./configure # make dist ... ld -r -d -nostdlib -L/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/cross-root-x86_64/x86_64-xen-elf/lib -m elf_x86_64 -\( /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/vtpm/vtpm.a app.lds -\) -ltpm -ltpm_crypto -lgmp -lpolarssl --undefined main -o /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o ld: warning: app.lds contains output sections; did you forget -T? ld: cannot find -lgmp make[2]: *** [/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o] Error 1 make[2]: Leaving directory `/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/extras/mini-os'' make[1]: *** [vtpm-stubdom] Error 2 What I found is that libgmp gets built and stored in .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib64 while on linking only the path .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib gets used where all other libs are located. The solution for me was: --- a/stubdom/Makefile Thu Feb 28 09:22:41 2013 +0100 +++ b/stubdom/Makefile Thu Mar 07 10:00:10 2013 +0100 @@ -47,7 +47,8 @@ TARGET_CPPFLAGS += -I$(CURDIR)/include TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include -TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib +TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib \ + -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib64 TARGETS=$(STUBDOM_TARGETS) Id had this behavior on different machines but all with opensuse-12.2. Do I something wrong in configure/compiling? Thanks. Dietmar.
Am Donnerstag 07 März 2013, 10:11:27 schrieb Dietmar Hahn:> Hi, > > I cloned a fresh xen-unstable tree and did: > > # ./configure > # make dist > ... > ld -r -d -nostdlib -L/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/cross-root-x86_64/x86_64-xen-elf/lib -m elf_x86_64 -\( /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/vtpm/vtpm.a app.lds -\) -ltpm -ltpm_crypto -lgmp -lpolarssl --undefined main -o /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o > ld: warning: app.lds contains output sections; did you forget -T? > ld: cannot find -lgmp > make[2]: *** [/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o] Error 1 > make[2]: Leaving directory `/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/extras/mini-os' > make[1]: *** [vtpm-stubdom] Error 2 > > What I found is that libgmp gets built and stored in > .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib64 > while on linking only the path > .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib > gets used where all other libs are located.I looked a little bit deeper and and found that stubdom/gmp-x86_64/configure line 1926 used $CONFIG_SITE and in opensuse-12.2 this points to /usr/share/site/x86_64-unknown-linux-gnu and there libdir get set: libdir='${exec_prefix}/lib64' This CONFIG_SITE variable gets set in /etc/profile.d/site.sh Interestingly only libgmp has this problem. Maybe this is special to opensuse?! Is nobody else using opensuse? Dietmar.> > The solution for me was: > > --- a/stubdom/Makefile Thu Feb 28 09:22:41 2013 +0100 > +++ b/stubdom/Makefile Thu Mar 07 10:00:10 2013 +0100 > @@ -47,7 +47,8 @@ > TARGET_CPPFLAGS += -I$(CURDIR)/include > TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include > > -TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib > +TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib \ > + -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib64 > > TARGETS=$(STUBDOM_TARGETS) > > Id had this behavior on different machines but all with opensuse-12.2. > Do I something wrong in configure/compiling? > Thanks.-- Company details: http://ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On Mon, 2013-03-11 at 08:50 +0000, Dietmar Hahn wrote:> Am Donnerstag 07 März 2013, 10:11:27 schrieb Dietmar Hahn: > > Hi, > > > > I cloned a fresh xen-unstable tree and did: > > > > # ./configure > > # make dist > > ... > > ld -r -d -nostdlib -L/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/cross-root-x86_64/x86_64-xen-elf/lib -m elf_x86_64 -\( /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/vtpm/vtpm.a app.lds -\) -ltpm -ltpm_crypto -lgmp -lpolarssl --undefined main -o /home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o > > ld: warning: app.lds contains output sections; did you forget -T? > > ld: cannot find -lgmp > > make[2]: *** [/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/stubdom/mini-os-x86_64-vtpm/mini-os_app.o] Error 1 > > make[2]: Leaving directory `/home/hahn/Src/Xen/WorkingTree/xen-unstable.hg/extras/mini-os' > > make[1]: *** [vtpm-stubdom] Error 2 > > > > What I found is that libgmp gets built and stored in > > .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib64 > > while on linking only the path > > .../stubdom/cross-root-x86_64/x86_64-xen-elf/lib > > gets used where all other libs are located. > > I looked a little bit deeper and and found that stubdom/gmp-x86_64/configure > line 1926 used $CONFIG_SITE and in opensuse-12.2 this points to > /usr/share/site/x86_64-unknown-linux-gnu > and there libdir get set: > libdir='${exec_prefix}/lib64' > > > This CONFIG_SITE variable gets set in /etc/profile.d/site.sh > Interestingly only libgmp has this problem.Nasty. Perhaps the best solution would be for the stubdom build machinery to clear out this envvar -- after all it is specific to the building Linux environment, which isn't necessarily the same as the stubdom env.> Maybe this is special to opensuse?! > Is nobody else using opensuse?I assume the suse.com guys are? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel