Date: Wed, 16 May 2001 20:42:49 -0700 (PDT) From: davids@webmaster.com To: FreeBSD-gnats-submit@freebsd.org Subject: ports/27402: LinuxThreads ports fails to statically link (size changed) Message-ID: <200105170342.f4H3gnl12391@freebsd4.build.webmaster.com>
next in thread | raw e-mail | index | archive | help
>Number: 27402 >Category: ports >Synopsis: Static linking problems with time functinos from LinuxThreads port >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 16 20:50:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: David Schwartz >Release: FreeBSD 4.3-STABLE i386 >Organization: WebMaster, Incorporated >Environment: System: FreeBSD freebsd4.build.webmaster.com 4.3-STABLE FreeBSD 4.3-STABLE #10: Wed May 16 12:22:09 PDT 2001 davids@freebsd4.build.webmaster.com:/usr/src/sys/compile/DAVIDS i386 LinuxThreads port >Description: Attemping to statically link causes problems with functions like localtime, gtime, and so on. Problem is that the symbols size has changed, causing fatal linker errors: /usr/lib/libc.a(localtime.o): In function ctime': localtime.o(.text+0x160c): multiple definition of ctime' /usr/local/lib/liblthread.a(libc_calls.o)(.text+0x60):/usr/ports/devel/ linuxthreads/work/linuxthreads-2.1.3_2/libc_calls.c: first defined here /usr/libexec/elf/ld: Warning: size of symbol ctime' changed from 93 to 28 in localtime.o /usr/lib/libc.a(localtime.o): In function localtime': localtime.o(.text+0x11cc): multiple definition of localtime' /usr/local/lib/liblthread.a(libc_calls.o)(.text+0xc0):/usr/ports/devel/ linuxthreads/work/linuxthreads-2.1.3_2/libc_calls.c: first defined here /usr/libexec/elf/ld: Warning: size of symbol localtime' changed from 93 to 41 in localtime.o /usr/lib/libc.a(localtime.o): In function gmtime': localtime.o(.text+0x1258): multiple definition of gmtime' /usr/local/lib/liblthread.a(libc_calls.o)(.text+0x120):/usr/ports/devel/ linuxthreads/work/linuxthreads-2.1.3_2/libc_calls.c: first defined here /usr/libexec/elf/ld: Warning: size of symbol gmtime' changed from 93 to 31 in localtime.o /usr/lib/libc.a(asctime.o): In function asctime': asctime.o(.text+0x0): multiple definition of asctime' /usr/local/lib/liblthread.a(libc_calls.o)(.text+0x0):/usr/ports/devel/ linuxthreads/work/linuxthreads-2.1.3_2/libc_calls.c: first defined here /usr/libexec/elf/ld: Warning: size of symbol asctime' changed from 93 to 24 in asctime.o >How-To-Repeat: Unfortunately, I'm not sure exactly what combination of circumstances triggers this problem. I'm working on the simplest possible code that triggers this. Perhaps something in my code grabs a header file that manages to pull in the wrong prototypes for these functions? I'm not really sure. >Fix: I'm not sure what the right fix is. Removing the code for 'ctime' 'asctime' 'gmtime', and 'localtime' from the LinuxThreads port works. Well-behaved multithreaded programs don't call these functions anyway. David Schwartz <davids@webmaster.com> >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105170342.f4H3gnl12391>