Re: [fossil-users] Building portable fossil
Looks like the binary built with "--with-openssl=none --static" on my fedora works on ubuntu (despite the warnings about static linking against glibc). Thanks all for help. Cheers, Jacek 2012/6/2 Jacek Cała : > Thank you all for your suggestions! > > Seems that it is not that obvious at all... I'll try the other way: to > compile on fedora and then run on ubuntu. > > BTW, the details are: > > *** Ubuntu 12.04 32-bit with libc.so.6 (libc6, OS ABI: Linux 2.6.24) > GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu10) stable release version > 2.15, by Roland McGrath et al. > Copyright (C) 2012 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > Compiled by GNU CC version 4.6.3. > Compiled on a Linux 3.2.14 system on 2012-04-19. > Available extensions: > crypt add-on version 2.1 by Michael Glad and others > GNU Libidn by Simon Josefsson > Native POSIX Threads Library by Ulrich Drepper et al > BIND-8.2.3-T5B > libc ABIs: UNIQUE IFUNC > > *** Fedora 7 with libc.so.6 (libc6, OS ABI: Linux 2.6.9) > GNU C Library stable release version 2.6, by Roland McGrath et al. > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. > Compiled by GNU CC version 4.1.2 20070502 (Red Hat 4.1.2-12). > Compiled on a Linux 2.6.9 system on 2007-07-08. > Available extensions: > The C stubs add-on version 2.1.2. > crypt add-on version 2.1 by Michael Glad and others > GNU Libidn by Simon Josefsson > Native POSIX Threads Library by Ulrich Drepper et al > BIND-8.2.3-T5B > RT using linux kernel aio > > > 2012/6/2 Rene : >> On 2012-06-02 03:16, Jacek Cała wrote: >>> >>> Thank you for the hint but it doesn't help. This time I get with my >>> binary: >>> >>> FATAL: kernel too old >>> Segmentation fault >>> >>> while the official one works fine. >>> >>> Jacek >>> >>> 2012/6/2 Richard Hipp : On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: > > > Hi, > > I built fossil on Ubuntu with a standard configuration (./configure; > make) but when moved and ran the binary on fedora it complained that > there's no libssl.so.1.0.0. Indeed, on the fedora is no > libssl.so.1.0.0 but libssl.so. > > When I turned off the ssl support (./configure --with-ssl=none; make) > and rebuilt, it complained on fedora about missing versions of glibc: > > /lib/libc.so.6: version `GLIBC_2.7' not found > /lib/libc.so.6: version `GLIBC_2.15' not found Try: ./configure --with-ssl=none --static; make Then run "strip fossil" when done. > > > What is the trick to build a portable binary like the one officially > available on the website? > > Also, I noticed that my binary is over 3.5MB whereas the official one > takes only 1.6MB. Any hints appreciated. > > Cheers, > Jacek > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users >>> ___ >>> fossil-users mailing list >>> fossil-users@lists.fossil-scm.org >>> >>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users >> >> >> >> ./configure --with-openssl=none --static; make >> >> then it says: >> >> bld/shell.o: In function `find_home_dir': >> /home/renez/src/fossil/./src/shell.c:2700: warning: Using 'getpwuid' in >> statically linked applications requires at runtime the shared libraries from >> the glibc version used for linking >> bld/http_socket.o: In function `socket_open': >> /home/renez/src/fossil/./src/http_socket.c:151: warning: Using >> 'gethostbyname' in statically linked applications requires at runtime the >> shared libraries from the glibc version used for linking >> >> libnsl and libc are necessary to run this executable. >> That is probably also true for the fossil executable from the website. >> >> http://www.kernel.org/pub/software/libs/glibc/hjl/compat/ tells how to >> compile for a version of glibc >> >> >> I think we need to look at environments to see what causes the differences >> Yours are >> 1) Ubuntu version ?? libc ?? >> 2) Fedora version ?? libc ?? >> Mine >> 1) Arch linux latest(64 bits that might add something to the size) >> libc (just type /l
Re: [fossil-users] Building portable fossil
Thank you all for your suggestions! Seems that it is not that obvious at all... I'll try the other way: to compile on fedora and then run on ubuntu. BTW, the details are: *** Ubuntu 12.04 32-bit with libc.so.6 (libc6, OS ABI: Linux 2.6.24) GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu10) stable release version 2.15, by Roland McGrath et al. Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.6.3. Compiled on a Linux 3.2.14 system on 2012-04-19. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC *** Fedora 7 with libc.so.6 (libc6, OS ABI: Linux 2.6.9) GNU C Library stable release version 2.6, by Roland McGrath et al. Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by GNU CC version 4.1.2 20070502 (Red Hat 4.1.2-12). Compiled on a Linux 2.6.9 system on 2007-07-08. Available extensions: The C stubs add-on version 2.1.2. crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B RT using linux kernel aio 2012/6/2 Rene : > On 2012-06-02 03:16, Jacek Cała wrote: >> >> Thank you for the hint but it doesn't help. This time I get with my >> binary: >> >> FATAL: kernel too old >> Segmentation fault >> >> while the official one works fine. >> >> Jacek >> >> 2012/6/2 Richard Hipp : >>> >>> >>> >>> On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: Hi, I built fossil on Ubuntu with a standard configuration (./configure; make) but when moved and ran the binary on fedora it complained that there's no libssl.so.1.0.0. Indeed, on the fedora is no libssl.so.1.0.0 but libssl.so. When I turned off the ssl support (./configure --with-ssl=none; make) and rebuilt, it complained on fedora about missing versions of glibc: /lib/libc.so.6: version `GLIBC_2.7' not found /lib/libc.so.6: version `GLIBC_2.15' not found >>> >>> >>> >>> Try: >>> >>> ./configure --with-ssl=none --static; make >>> >>> Then run "strip fossil" when done. >>> What is the trick to build a portable binary like the one officially available on the website? Also, I noticed that my binary is over 3.5MB whereas the official one takes only 1.6MB. Any hints appreciated. Cheers, Jacek ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users >>> >>> >>> >>> >>> >>> -- >>> D. Richard Hipp >>> d...@sqlite.org >>> >>> ___ >>> fossil-users mailing list >>> fossil-users@lists.fossil-scm.org >>> >>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users >>> >> ___ >> fossil-users mailing list >> fossil-users@lists.fossil-scm.org >> >> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > > > > ./configure --with-openssl=none --static; make > > then it says: > > bld/shell.o: In function `find_home_dir': > /home/renez/src/fossil/./src/shell.c:2700: warning: Using 'getpwuid' in > statically linked applications requires at runtime the shared libraries from > the glibc version used for linking > bld/http_socket.o: In function `socket_open': > /home/renez/src/fossil/./src/http_socket.c:151: warning: Using > 'gethostbyname' in statically linked applications requires at runtime the > shared libraries from the glibc version used for linking > > libnsl and libc are necessary to run this executable. > That is probably also true for the fossil executable from the website. > > http://www.kernel.org/pub/software/libs/glibc/hjl/compat/ tells how to > compile for a version of glibc > > > I think we need to look at environments to see what causes the differences > Yours are > 1) Ubuntu version ?? libc ?? > 2) Fedora version ?? libc ?? > Mine > 1) Arch linux latest(64 bits that might add something to the size) > libc (just type /lib/libc.so.6 and press enter) > GNU C Library stable release version 2.15, by Roland McGrath et al > Compiled by GNU CC version 4.7.0 20120324 (prerelease). > Compiled on a Linux 3.3.0 system on 2012-03-29. > Available extensions: > crypt add-on version 2.1 by Michael Glad and others > GNU Libidn by Simon Josefsson > Native POSIX Thread
Re: [fossil-users] Building portable fossil
On Sat, 2 Jun 2012 18:57:23 +0200, fossil-users-boun...@lists.fossil-scm.org wrote: > On Sat, Jun 2, 2012 at 6:44 PM, Rene wrote: > > > 1) Ubuntu version ?? libc ?? > > > 2) Fedora version ?? libc ?? > > Mine > > > > AFAIK, glibc has not been able to statically link the networking libs for > many years. This affects not only fossil, but also clients of libv8 (even > though it only uses networking for internal comms within its own debugger), > libmysql, and several other libs i've worked with. > > Solaris hasn't, for several years, supported static linking against system > libs (at all). It just caused too much compatibility grief for them > long-term. > > > If I compile against uclibc(=32 bits) I get 3.6M after strip 1.3M after > > gzip -9 638K. > > > > If you want de uclibc executable drop me a line. > > > Out of curiosity: what build flags are needed for building against uclib? None, only set tcc=i686-linux-gcc PATH=$ulib/usr/bin:$PATH make > > -- > - stephan beal > http://wanderinghorse.net/home/stephan/ > http://gplus.to/sgbeal ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On Sat, Jun 2, 2012 at 6:44 PM, Rene wrote: > 1) Ubuntu version ?? libc ?? > 2) Fedora version ?? libc ?? > Mine > AFAIK, glibc has not been able to statically link the networking libs for many years. This affects not only fossil, but also clients of libv8 (even though it only uses networking for internal comms within its own debugger), libmysql, and several other libs i've worked with. Solaris hasn't, for several years, supported static linking against system libs (at all). It just caused too much compatibility grief for them long-term. If I compile against uclibc(=32 bits) I get 3.6M after strip 1.3M after > gzip -9 638K. > > If you want de uclibc executable drop me a line. Out of curiosity: what build flags are needed for building against uclib? -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On 2012-06-02 03:16, Jacek Cała wrote: Thank you for the hint but it doesn't help. This time I get with my binary: FATAL: kernel too old Segmentation fault while the official one works fine. Jacek 2012/6/2 Richard Hipp : On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: Hi, I built fossil on Ubuntu with a standard configuration (./configure; make) but when moved and ran the binary on fedora it complained that there's no libssl.so.1.0.0. Indeed, on the fedora is no libssl.so.1.0.0 but libssl.so. When I turned off the ssl support (./configure --with-ssl=none; make) and rebuilt, it complained on fedora about missing versions of glibc: /lib/libc.so.6: version `GLIBC_2.7' not found /lib/libc.so.6: version `GLIBC_2.15' not found Try: ./configure --with-ssl=none --static; make Then run "strip fossil" when done. What is the trick to build a portable binary like the one officially available on the website? Also, I noticed that my binary is over 3.5MB whereas the official one takes only 1.6MB. Any hints appreciated. Cheers, Jacek ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ./configure --with-openssl=none --static; make then it says: bld/shell.o: In function `find_home_dir': /home/renez/src/fossil/./src/shell.c:2700: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking bld/http_socket.o: In function `socket_open': /home/renez/src/fossil/./src/http_socket.c:151: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libnsl and libc are necessary to run this executable. That is probably also true for the fossil executable from the website. http://www.kernel.org/pub/software/libs/glibc/hjl/compat/ tells how to compile for a version of glibc I think we need to look at environments to see what causes the differences Yours are 1) Ubuntu version ?? libc ?? 2) Fedora version ?? libc ?? Mine 1) Arch linux latest(64 bits that might add something to the size) libc (just type /lib/libc.so.6 and press enter) GNU C Library stable release version 2.15, by Roland McGrath et al Compiled by GNU CC version 4.7.0 20120324 (prerelease). Compiled on a Linux 3.3.0 system on 2012-03-29. Available extensions: crypt add-on version 2.1 by Michael Glad and others GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al BIND-8.2.3-T5B libc ABIs: UNIQUE IFUNC 2) uclibc 0.9.3? Richard debian ?? libc ?? As to size Well static means include everything and the kitchen sink in the executable. It tends to get bigger. Strip will remove quite a bit of symbols. Don't use strip if you want to use a debugger. Mine is 6.5M before strip. After strip 2.2M (64 bits) If I compile against uclibc(=32 bits) I get 3.6M after strip 1.3M after gzip -9 638K. If you want de uclibc executable drop me a line. -- Rene ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On Sat, Jun 02, 2012 at 03:56:51PM +0200, Stephan Beal wrote: > On Sat, Jun 2, 2012 at 3:49 PM, Lluís Batlle i Rossell > wrote: > > > I don't know how back-compatible are linux-headers, but glibc can be built > > with > > "--enable-kernel=2.6.0" or "--enable-kernel=2.4.0", something like that. > > Maybe > > only that already determines what syscalls glibc will use. In any case, > > this > > means to build a new glibc. > > > > > Untested, but _maybe_ you could build against ulibc? > > http://www.uclibc.org/ That will statically link *name resolution*, at least, but may not solve the problems about the version of the linux syscalls used, unless telling uclibc what syscall version to use. glibc does not provide a statically-linkable name resolution (hosts, users, ... whatever). ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On Sat, Jun 2, 2012 at 3:49 PM, Lluís Batlle i Rossell wrote: > I don't know how back-compatible are linux-headers, but glibc can be built > with > "--enable-kernel=2.6.0" or "--enable-kernel=2.4.0", something like that. > Maybe > only that already determines what syscalls glibc will use. In any case, > this > means to build a new glibc. > Untested, but _maybe_ you could build against ulibc? http://www.uclibc.org/ -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On Sat, Jun 02, 2012 at 02:16:52AM +0100, Jacek Cała wrote: > Thank you for the hint but it doesn't help. This time I get with my binary: > > FATAL: kernel too old > Segmentation fault I think it's about the linux headers glibc is built with. Those determine the syscalls that will be issued by the program. You'd need a glibc built with older linux headers, and build fossil with it, if you target those old kernels. I don't know how back-compatible are linux-headers, but glibc can be built with "--enable-kernel=2.6.0" or "--enable-kernel=2.4.0", something like that. Maybe only that already determines what syscalls glibc will use. In any case, this means to build a new glibc. Regards, Lluís. > 2012/6/2 Richard Hipp : > > > > > > On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: > >> > >> Hi, > >> > >> I built fossil on Ubuntu with a standard configuration (./configure; > >> make) but when moved and ran the binary on fedora it complained that > >> there's no libssl.so.1.0.0. Indeed, on the fedora is no > >> libssl.so.1.0.0 but libssl.so. > >> > >> When I turned off the ssl support (./configure --with-ssl=none; make) > >> and rebuilt, it complained on fedora about missing versions of glibc: > >> > >> /lib/libc.so.6: version `GLIBC_2.7' not found > >> /lib/libc.so.6: version `GLIBC_2.15' not found > > > > > > Try: > > > > ./configure --with-ssl=none --static; make > > > > Then run "strip fossil" when done. > > > >> > >> > >> What is the trick to build a portable binary like the one officially > >> available on the website? > >> > >> Also, I noticed that my binary is over 3.5MB whereas the official one > >> takes only 1.6MB. Any hints appreciated. > >> > >> Cheers, > >> Jacek > >> ___ > >> fossil-users mailing list > >> fossil-users@lists.fossil-scm.org > >> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > > > > > > > > > > -- > > D. Richard Hipp > > d...@sqlite.org > > > > ___ > > fossil-users mailing list > > fossil-users@lists.fossil-scm.org > > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > > > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
Thank you for the hint but it doesn't help. This time I get with my binary: FATAL: kernel too old Segmentation fault while the official one works fine. Jacek 2012/6/2 Richard Hipp : > > > On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: >> >> Hi, >> >> I built fossil on Ubuntu with a standard configuration (./configure; >> make) but when moved and ran the binary on fedora it complained that >> there's no libssl.so.1.0.0. Indeed, on the fedora is no >> libssl.so.1.0.0 but libssl.so. >> >> When I turned off the ssl support (./configure --with-ssl=none; make) >> and rebuilt, it complained on fedora about missing versions of glibc: >> >> /lib/libc.so.6: version `GLIBC_2.7' not found >> /lib/libc.so.6: version `GLIBC_2.15' not found > > > Try: > > ./configure --with-ssl=none --static; make > > Then run "strip fossil" when done. > >> >> >> What is the trick to build a portable binary like the one officially >> available on the website? >> >> Also, I noticed that my binary is over 3.5MB whereas the official one >> takes only 1.6MB. Any hints appreciated. >> >> Cheers, >> Jacek >> ___ >> fossil-users mailing list >> fossil-users@lists.fossil-scm.org >> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > > > > > -- > D. Richard Hipp > d...@sqlite.org > > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Building portable fossil
On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała wrote: > Hi, > > I built fossil on Ubuntu with a standard configuration (./configure; > make) but when moved and ran the binary on fedora it complained that > there's no libssl.so.1.0.0. Indeed, on the fedora is no > libssl.so.1.0.0 but libssl.so. > > When I turned off the ssl support (./configure --with-ssl=none; make) > and rebuilt, it complained on fedora about missing versions of glibc: > > /lib/libc.so.6: version `GLIBC_2.7' not found > /lib/libc.so.6: version `GLIBC_2.15' not found > Try: ./configure --with-ssl=none --static; make Then run "strip fossil" when done. > > What is the trick to build a portable binary like the one officially > available on the website? > > Also, I noticed that my binary is over 3.5MB whereas the official one > takes only 1.6MB. Any hints appreciated. > > Cheers, > Jacek > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Building portable fossil
Hi, I built fossil on Ubuntu with a standard configuration (./configure; make) but when moved and ran the binary on fedora it complained that there's no libssl.so.1.0.0. Indeed, on the fedora is no libssl.so.1.0.0 but libssl.so. When I turned off the ssl support (./configure --with-ssl=none; make) and rebuilt, it complained on fedora about missing versions of glibc: /lib/libc.so.6: version `GLIBC_2.7' not found /lib/libc.so.6: version `GLIBC_2.15' not found What is the trick to build a portable binary like the one officially available on the website? Also, I noticed that my binary is over 3.5MB whereas the official one takes only 1.6MB. Any hints appreciated. Cheers, Jacek ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users