Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Wed, 18 Jan 2012 20:49:37 -0500 Baho Utot baho-u...@columbus.rr.com wrote: I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. I don't agree. I configure mpc with: ./configure --prefix=/usr --disable-static It installs: /usr/include/mpc.h /usr/lib/libmpc.so.2.0.0 /usr/lib/libmpc.so.2 /usr/lib/libmpc.so /usr/lib/libmpc.la /usr/share/info/mpc.info Andy -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Wednesday 18 January 2012 10:07:33 pm Bruce Dubbs wrote: Ken Moffat wrote: On Wed, Jan 18, 2012 at 08:49:37PM -0500, Baho Utot wrote: I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. If autoreconf is run before doing the configure it builds the shared library as well. I expect gcc will links to mpc statically as per the book. I don't think so: $ cd /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1 $ ldd cc1 linux-vdso.so.1 = (0x7fff5fdb3000) libmpc.so.2 = /usr/lib/libmpc.so.2 (0x7fe420058000) libmpfr.so.4 = /usr/lib/libmpfr.so.4 (0x7fe41fdfd000) libgmp.so.10 = /usr/lib/libgmp.so.10 (0x7fe41fb91000) libdl.so.2 = /lib/libdl.so.2 (0x7fe41f98d000) libz.so.1 = /lib/libz.so.1 (0x7fe41f775000) libc.so.6 = /lib/libc.so.6 (0x7fe41f3ee000) libm.so.6 = /lib/libm.so.6 (0x7fe41f16c000) /lib64/ld-linux-x86-64.so.2 (0x7fe42026c000) -- Bruce This is a list of files installed from my build of mpc usr/ usr/lib/ usr/lib/libmpc.a usr/include/ usr/include/mpc.h You see I am missing the shared library. The only time I get the shared library is when I use ayotools autoreconf but that can't be done with the build because as you know they are not present at this point in the build. gmp amd mpfr do have shared libraaries only mpc doesn't on this build. All of these libraries very built according to the book. Any deviation found is/was an error on my part. I have not built gcc. I will do that today and the run ldd -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Thursday 19 January 2012 06:14:10 am Andrew Benton wrote: On Wed, 18 Jan 2012 20:49:37 -0500 Baho Utot baho-u...@columbus.rr.com wrote: I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. I don't agree. I configure mpc with: ./configure --prefix=/usr --disable-static It installs: /usr/include/mpc.h /usr/lib/libmpc.so.2.0.0 /usr/lib/libmpc.so.2 /usr/lib/libmpc.so /usr/lib/libmpc.la /usr/share/info/mpc.info Andy I am just reporting what I see on this build in progress. When build in the chroot I get this result of the build usr/ usr/lib/ usr/lib/libmpc.a usr/include/ usr/include/mpc.h When I build on the host I get the same thing. Only when I add autoreconf before the ./configure step do I get the shared library. I wiull try building gcc today I have not progressed to that point just yet. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Wednesday 18 January 2012 09:16:27 pm Ken Moffat wrote: [putolin] I disagree with the first part. I don't have the book open in front of me (just shutting down, but this looked important enough to take a look). I use ./configure --prefix=/usr and I also have 'unset CFLAGS' before this because of the following comment: # checking whether the gcc linker # (/tools/x86_64-unknown-linux-gnu/bin/ld -m elf_x86_64) supports # shared libraries... ./configure: line 8413: : supported targets:.* # elf: command not found no # http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000809.htm l # and then # http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000819.htm l From that, and with my buildscript functions to rename static libs to .hidden and to note what now exists which is newer than when I began to build the package (might not catch all the headers), I see the following were installed: /usr/include/mpc.h /usr/lib/libmpc.a.hidden /usr/lib/libmpc.la /usr/lib/libmpc.so /usr/lib/libmpc.so.2 /usr/lib/libmpc.so.2.0.0 /usr/share/info/dir /usr/share/info/mpc.info I believe I may have found the problema When I build it with the following MAKEFLAGS=-j4 CFLAGS=-march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer CXXFLAGS=${CFLAGS} LDFLAGS=-Wl,-O1 -Wl,--as-needed export CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS It will _NOT_ build the shared libraries usr/lib/libmpc.so.2 usr/lib/libmpc.so.2.0.0 usr/lib/libmpc.so Removing the CFLAGS and CXXFLAGS will result in the libraries being built Here is a partial diff between the two build logs, The first is without CFLAGS set The second with CFLAGS set mv -f .deps/sqrt.Tpo .deps/sqrt.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer -MT tanh.lo -MD -MP -MF .deps/tanh.Tpo -c -o tanh.lo tanh.c mv -f .deps/sqrt.Tpo .deps/sqrt.Plo /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer -MT tan.lo -MD -MP -MF .deps/tan.Tpo -c -o tan.lo tan.c As you see the only difference is gcc -std=gnu99 - without CFLAGS set gcc - with CFLAGS set This is at the bottom where the shared library is created libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer -MT ui_ui_sub.lo -MD -MP -MF .deps/ui_ui_sub.Tpo -c ui_ui_sub.c -o ui_ui_sub.o 409,412c337 /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer -version-info 2:0:0 -Wl,-O1 -Wl,--as-needed -o libmpc.la -rpath /usr/lib abs.lo acos.lo acosh.lo add.lo add_fr.lo add_si.lo add_ui.lo arg.lo asin.lo asinh.lo atan.lo atanh.lo clear.lo cmp.lo cmp_si_si.lo conj.lo cosh.lo div_2exp.lo div.lo div_fr.lo div_ui.lo exp.lo fma.lo fr_div.lo fr_sub.lo get.lo get_prec2.lo get_prec.lo get_str.lo get_version.lo imag.lo init2.lo init3.lo inp_str.lo log.lo mem.lo mul_2exp.lo mul.lo mul_fr.lo mul_i.lo mul_si.lo mul_ui.lo neg.lo norm.lo out_str.lo pow.lo pow_fr.lo pow_ld.lo pow_d.lo pow_si.lo pow_ui.lo pow_z.lo proj.lo real.lo urandom.lo set.lo set_prec.lo set_str.lo set_x.lo set_x_x.lo sin_cos.lo sinh.lo sqr.lo sqrt.lo strtoc.lo sub.lo sub_fr.lo sub_ui.lo swap.lo tan.lo tanh.lo uceil_log2.lo ui_div.lo ui_ui_sub.lo -lmpfr -lgmp -lm libtool: link: gcc -std=gnu99 -shared .libs/abs.o .libs/acos.o .libs/acosh.o .libs/add.o .libs/add_fr.o .libs/add_si.o .libs/add_ui.o .libs/arg.o .libs/asin.o .libs/asinh.o .libs/atan.o .libs/atanh.o .libs/clear.o .libs/cmp.o .libs/cmp_si_si.o .libs/conj.o .libs/cosh.o .libs/div_2exp.o .libs/div.o .libs/div_fr.o .libs/div_ui.o .libs/exp.o .libs/fma.o .libs/fr_div.o .libs/fr_sub.o .libs/get.o .libs/get_prec2.o .libs/get_prec.o .libs/get_str.o .libs/get_version.o .libs/imag.o .libs/init2.o .libs/init3.o .libs/inp_str.o .libs/log.o .libs/mem.o .libs/mul_2exp.o .libs/mul.o .libs/mul_fr.o .libs/mul_i.o .libs/mul_si.o .libs/mul_ui.o .libs/neg.o .libs/norm.o .libs/out_str.o .libs/pow.o .libs/pow_fr.o .libs/pow_ld.o .libs/pow_d.o .libs/pow_si.o .libs/pow_ui.o .libs/pow_z.o .libs/proj.o .libs/real.o .libs/urandom.o .libs/set.o .libs/set_prec.o .libs/set_str.o .libs/set_x.o .libs/set_x_x.o .libs/sin_cos.o .libs/sinh.o .libs/sqr.o .libs/sqrt.o .libs/strtoc.o .libs/sub.o .libs/sub_fr.o .libs/sub_ui.o .libs/swap.o .libs/tan.o .libs/tanh.o .libs/uceil_log2.o .libs/ui_div.o .libs/ui_ui_sub.o -lmpfr -lgmp -lm -march=i686 -mtune=i686 -Wl,-O1 -Wl,--as-needed -Wl,-soname -Wl,libmpc.so.2 -o .libs/libmpc.so.2.0.0 libtool: link: (cd .libs rm -f libmpc.so.2 ln -s libmpc.so.2.0.0 libmpc.so.2) libtool: link: (cd .libs rm -f libmpc.so ln -s libmpc.so.2.0.0 libmpc.so) --- /bin/sh ../libtool --tag=CC --mode=link gcc -march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer -version-info 2:0:0 -Wl,-O1 -Wl,--as-needed -o libmpc.la -rpath /usr/lib abs.lo
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Thursday 19 January 2012 08:18:21 am Ken Moffat wrote: On Thu, Jan 19, 2012 at 07:14:42AM -0500, Baho Utot wrote: When I build on the host I get the same thing. Only when I add autoreconf before the ./configure step do I get the shared library. I wiull try building gcc today I have not progressed to that point just yet. If you are the only person to see a problem, it typically means one of two things: (a) you're on a bleeding-edge host system, nobody else has tried what you are doing. Yes I am on Arch linux...The bloodest bledding edge distro ;) That is why I am moving to LFS for all my computers...It's more sane. I don't care for all the split packages etc. I just want something that works. (b) you're doing something unusual. If you are runnning scripts, either something you do has caused unintended consequences for this package, or else there was an error that didn't get trapped. In my case, setting my own CFLAGS and touching files (to get them to show up in the install log) are my main deviations, and both have bitten me from time to time :) Just setting the CFLAGS CXXFLAGS LDFLAGS, which I now believe is indeed the problem. THe funny thing is I set CFLAGS to what it builds with by default( without me seeting the flags) and use that in the CFLAGS to then build it. It will not make/build the shared library until you do a autoreconf. I don't know why that happens. I am setting the FLAGS so I camn build once install everywhere. I'll just need to look at things better when setting the flags. Any way this old fart has learned something today. If you are going to mess with the flags an autoreconf may be in order. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
Baho Utot wrote: I believe I may have found the problema When I build it with the following MAKEFLAGS=-j4 CFLAGS=-march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer CXXFLAGS=${CFLAGS} LDFLAGS=-Wl,-O1 -Wl,--as-needed export CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS I thought we discouraged setting CFLAGS, but I don't see it now. Perhaps we need a caution in Ssction 4.4 -- Setting Up the Environment. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Thursday 19 January 2012 11:53:31 am Bruce Dubbs wrote: Baho Utot wrote: I believe I may have found the problema When I build it with the following MAKEFLAGS=-j4 CFLAGS=-march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer CXXFLAGS=${CFLAGS} LDFLAGS=-Wl,-O1 -Wl,--as-needed export CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS I thought we discouraged setting CFLAGS, but I don't see it now. Perhaps we need a caution in Ssction 4.4 -- Setting Up the Environment. Perhaps, Those FLAGS are from Gentoo Safe Cflags document. Looks like the are not safe in all cases ;) Anyway an autotools autoreconf fixes that, but I don't understand what it is really fixing, other that to configure the environment to this particular host. Must be something in the configure script. The only thing I found missing when looking at the los form each build ( with cflags and without ) was this in the log without the cflags yes CC=gcc -std=gnu99 CFLAGS=-march=i686 -mtune=i686 -O2 -pipe -fomit-frame-pointer In the log with the cflags that line in not there and it also doesn't have -std=gnu9 in the lines that call gcc. Anyway unset CFLAGS fixes it. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
[lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. If autoreconf is run before doing the configure it builds the shared library as well. I expect gcc will links to mpc statically as per the book. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
On Wed, Jan 18, 2012 at 08:49:37PM -0500, Baho Utot wrote: I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. If autoreconf is run before doing the configure it builds the shared library as well. I expect gcc will links to mpc statically as per the book. I disagree with the first part. I don't have the book open in front of me (just shutting down, but this looked important enough to take a look). I use ./configure --prefix=/usr and I also have 'unset CFLAGS' before this because of the following comment: # checking whether the gcc linker # (/tools/x86_64-unknown-linux-gnu/bin/ld -m elf_x86_64) supports # shared libraries... ./configure: line 8413: : supported targets:.* # elf: command not found no # http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000809.html # and then # http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000819.html From that, and with my buildscript functions to rename static libs to .hidden and to note what now exists which is newer than when I began to build the package (might not catch all the headers), I see the following were installed: /usr/include/mpc.h /usr/lib/libmpc.a.hidden /usr/lib/libmpc.la /usr/lib/libmpc.so /usr/lib/libmpc.so.2 /usr/lib/libmpc.so.2.0.0 /usr/share/info/dir /usr/share/info/mpc.info For the second part, I don't know which parts of gcc are linked against libmpc, so the fact that I can't see them in a quick look with ldd doesn't unduly concern me. If anyone has evidence either for or against libmpc being linked statically in gcc, please share it! ĸen -- das eine Mal als Tragödie, das andere Mal als Farce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: [lfs-support] LFS-7.0 Chapter 6.16. MPC-0.9 FYI
Ken Moffat wrote: On Wed, Jan 18, 2012 at 08:49:37PM -0500, Baho Utot wrote: I have been working on mpc. I have noticed that the way it is built in the book it only builds the static library. If --enable-shared is passed to configure it look like that is ignored as it still doesn't build the shared library. If autoreconf is run before doing the configure it builds the shared library as well. I expect gcc will links to mpc statically as per the book. I don't think so: $ cd /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1 $ ldd cc1 linux-vdso.so.1 = (0x7fff5fdb3000) libmpc.so.2 = /usr/lib/libmpc.so.2 (0x7fe420058000) libmpfr.so.4 = /usr/lib/libmpfr.so.4 (0x7fe41fdfd000) libgmp.so.10 = /usr/lib/libgmp.so.10 (0x7fe41fb91000) libdl.so.2 = /lib/libdl.so.2 (0x7fe41f98d000) libz.so.1 = /lib/libz.so.1 (0x7fe41f775000) libc.so.6 = /lib/libc.so.6 (0x7fe41f3ee000) libm.so.6 = /lib/libm.so.6 (0x7fe41f16c000) /lib64/ld-linux-x86-64.so.2 (0x7fe42026c000) -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page