On Wed, Jun 10, 2015 at 8:50 PM, Eric Rubin-Smith <eas....@gmail.com> wrote:
> > > Eric: Can you discover what apt-get is needed in order to statically >> link libssl using -m32? >> > > Perhaps this? > > # apt-get install libssl-dev:i386 > > Warning: I just got that command line from google and verified apt-get > accepted it -- didn't actually try to link against the libs in that package. > I poked at this some more and it seems to work: [little:fossil-src-1.33] $ make distclean rm -rf bld/* fossil rm -f autoconfig.h config.log Makefile [little:fossil-src-1.33] $ export CFLAGS=-m32 LDFLAGS=-m32 [little:fossil-src-1.33] $ ./configure --with-openssl Host System...x86_64-unknown-linux-gnu Build System...x86_64-unknown-linux-gnu C compiler... cc -m32 C++ compiler... c++ -m32 Build C compiler...cc Checking for stdlib.h...ok Checking for uint32_t...ok Checking for uint16_t...ok Checking for int16_t...ok Checking for uint8_t...ok Checking for pread...ok Checking for tclsh...ok Checking for ssl in 1...ok HTTPS support enabled Checking for zlib.h...ok Checking libs for inflateEnd...-lz Checking for readline/readline.h...not found Checking for editline/readline.h...not found Checking libs for gethostbyname...none needed Checking libs for socket...none needed Checking libs for iconv...none needed Checking for utime...ok Checking for usleep...ok Checking for strchrnul...ok Checking for getloadavg...ok Checking for getpassphrase...not found Checking libs for getpass...none needed Checking libs for dlopen...-ldl Checking libs for sin...-lm Checking libs for fuse_mount...no Created Makefile from Makefile.in Created autoconfig.h [little:fossil-src-1.33] $ vi Makefile ... make this edit: --- Makefile.old 2015-06-10 21:53:54.376496452 -0400 +++ Makefile 2015-06-10 21:54:02.664496097 -0400 @@ -38,7 +38,7 @@ # TCLSH = tclsh -LIB = -m32 -L1/lib -lssl -lcrypto -lz -ldl -lm +LIB = -m32 -L1/lib /usr/lib/i386-linux-gnu/libssl.a /usr/lib/i386-linux-gnu/libcrypto.a -lz -ldl -lm TCCFLAGS = -I1/include -m32 -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H INSTALLDIR = $(DESTDIR)/usr/local/bin USE_SYSTEM_SQLITE = 0 [little:fossil-src-1.33] $ make -j10 ... [little:fossil-src-1.33] $ file ./fossil ./fossil: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=6ed3d241209ed598c1ac326e169ff40239ad5f5f, not stripped [little:fossil-src-1.33] $ ldd ./fossil linux-gate.so.1 => (0xf76f9000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf76bd000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76b8000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7671000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74c3000) /lib/ld-linux.so.2 (0xf76fa000) [little:aterlo] $ ../Downloads/fossil-src-1.33/fossil pull Pull from https://eas@<redacted>/ Round-trips: 1 Artifacts sent: 0 received: 0 Pull done, sent: 390 received: 553 ip: <redacted> [little:aterlo] $ i.e. success on all fronts, I think. You'd then just need to fix up your Makefile to figure out dynamically whether to include the static or shared libssl and libcrypto.
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users