From owner-freebsd-ports@FreeBSD.ORG Tue Jan 4 09:29:31 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A9DC16A4CE; Tue, 4 Jan 2005 09:29:31 +0000 (GMT) Received: from brain.cc.rsu.ru (brain.cc.rsu.ru [195.208.252.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F33843D39; Tue, 4 Jan 2005 09:29:30 +0000 (GMT) (envelope-from os@brain.cc.rsu.ru) Received: from brain.cc.rsu.ru (localhost [127.0.0.1]) by brain.cc.rsu.ru (8.13.1/8.12.9) with ESMTP id j049TKRi056998; Tue, 4 Jan 2005 12:29:20 +0300 (MSK) (envelope-from os@brain.cc.rsu.ru) Received: (from os@localhost) by brain.cc.rsu.ru (8.13.1/8.12.9/Submit) id j049TKpB056997; Tue, 4 Jan 2005 12:29:20 +0300 (MSK) (envelope-from os) Date: Tue, 4 Jan 2005 12:29:20 +0300 (MSK) Message-Id: <200501040929.j049TKpB056997@brain.cc.rsu.ru> To: FreeBSD-gnats-submit@freebsd.org From: Oleg Sharoiko X-send-pr-version: 3.113 X-GNATS-Notify: cc: ports@freebsd.org Subject: lang/gcc32 uses libc_r instead of libpthread on 5.3 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Oleg Sharoiko List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 09:29:31 -0000 >Submitter-Id: current-users >Originator: Oleg Sharoiko >Organization: Computer Center of Rostov State University >Confidential: no >Synopsis: lang/gcc32 uses libc_r instead of libpthread on 5.3 >Severity: serious >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 5.3-STABLE i386 >Environment: System: FreeBSD wolf.os.rsu.ru 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Jan 1 21:36:31 MSK 2005 os@wolf.os.rsu.ru:/usr/obj/usr/src/sys/wolf.os.i686.RELENG_5.2005-01-01 i386 >Description: The commit http://docs.freebsd.org/cgi/getmsg.cgi?fetch=305919+0+archive/2004/cvs-all/20041226.cvs-all broke selection of pthreads library on 5.3 wolf, ~/src/test > uname -a FreeBSD wolf.os.rsu.ru 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Jan 1 21:36:31 MSK 2005 os@wolf.os.rsu.ru:/usr/obj/usr/src/sys/wolf.os.i686.RELENG_5.2005-01-01 i386 With system compiler: wolf, ~/src/test > gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.4.2 [FreeBSD] 20040728 wolf, ~/src/test > gcc -Wall -pedantic -pthread test_pth.c -o test_pth wolf, ~/src/test > ldd test_pth test_pth: libpthread.so.1 => /usr/lib/libpthread.so.1 (0x28081000) libc.so.5 => /lib/libc.so.5 (0x280a7000) With gcc32 from ports wolf, ~/src/test > gcc32 -v Reading specs from /usr/local/lib/gcc-lib/i386-portbld-freebsd5.3/3.2.3/specs Configured with: ./..//gcc-3.2.3/configure --disable-nls --with-gxx-include-dir=/usr/local/lib/gcc-lib/i386-portbld-freebsd5.3/3.2.3/include/g++-v3 --with-system-zlib --includedir=/usr/local/lib/gcc-lib/i386-portbld-freebsd5.3/3.2.3/include/Java --disable-shared --prefix=/usr/local i386-portbld-freebsd5.3 Thread model: posix gcc version 3.2.3 wolf, ~/src/test > gcc32 -Wall -pedantic -pthread test_pth.c -o test_pth wolf, ~/src/test > ldd test_pth test_pth: libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28081000) libc.so.5 => /lib/libc.so.5 (0x280a5000) This at least breaks editors/openoffice-1.1 linking it's binaries against both libc_r and libpthread. Number of people complained on freebsd-openoffice: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=15561+0+archive/2004/freebsd-openoffice/20041231.freebsd-openoffice http://docs.freebsd.org/cgi/getmsg.cgi?fetch=53386+0+archive/2004/freebsd-openoffice/20041231.freebsd-openoffice http://docs.freebsd.org/cgi/getmsg.cgi?fetch=0+0+archive/2004/freebsd-openoffice/20041231.freebsd-openoffice >How-To-Repeat: Builg lang/gcc32 Try to link with -pthread Check libs with ldd It's also possible to check /usr/local/lib/gcc-lib/i386-portbld-freebsd5.3/3.2.3/specs for pthread libs specification >Fix: Either rollback the commit or change the patch-gcc,config,freebsd-spec.h It may have sence that gcc/config/freebsd-spec.h has a note in comments that __FreeBSD_version from osreldate.h can not be used because it breaks cross-compilation. No sure what would be the best solution so I leave it for someone more competent to decide.