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 <d...@sqlite.org>:


On Fri, Jun 1, 2012 at 8:34 PM, Jacek Cała <jacek.c...@gmail.com> 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

Reply via email to