From owner-freebsd-questions@FreeBSD.ORG Mon Nov 24 18:19:11 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D42A106564A for ; Mon, 24 Nov 2008 18:19:11 +0000 (UTC) (envelope-from xotazu@cvc.uab.es) Received: from damascus.uab.es (damascus.uab.es [158.109.168.135]) by mx1.freebsd.org (Postfix) with ESMTP id 499D48FC1D for ; Mon, 24 Nov 2008 18:19:11 +0000 (UTC) (envelope-from xotazu@cvc.uab.es) Received: from damascus.uab.es ([127.0.0.1]) by damascus.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with ESMTP id <0KAU0043RLF2D870@damascus.uab.es> for freebsd-questions@freebsd.org; Mon, 24 Nov 2008 18:18:38 +0100 (CET) Received: from cvc.uab.es ([158.109.4.2]) by damascus.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with SMTP id <0KAU00H71LF23G70@damascus.uab.es> for freebsd-questions@freebsd.org; Mon, 24 Nov 2008 18:18:38 +0100 (CET) Received: from cvc131.uab.es by cvc.uab.es (SMI-8.6/SMI-SVR4) id SAA02545; Mon, 24 Nov 2008 18:12:59 +0100 Date: Mon, 24 Nov 2008 18:19:23 +0100 From: Xavier Otazu In-reply-to: <20081121120023.D64301065720@hub.freebsd.org> To: freebsd-questions@freebsd.org Message-id: <20081124181923.25e8c7db@cvc131.uab.es> Organization: CVC MIME-version: 1.0 X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20081121120023.D64301065720@hub.freebsd.org> Subject: gcc cross-compiler for linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Nov 2008 18:19:11 -0000 Hello, I would like to compile a C++ code to be executed within the linux emulator. I tried to install the cross-gcc port, but when building I always receive the same compilation error related to gthreads. I use the following options when compiling the cross-gcc port: make TGTARCH=i386 TGTABI=linux install clean I also tried several combinations like "i386-pc" and "linux-gnu". When building, I get the following error message: /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/xgcc -B/usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/ -B/usr/local/i386-linux/bin/ -B/usr/local/i386-linux/lib/ -isystem /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc -isystem /usr/local/i386-linux/include -isystem /usr/local/i386-linux/sys-include -O2 -O2 -O2 -fno-strict-aliasing -pipe -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I../.././gcc/../libdecnumber -I../libdecnumber -fexceptions -c ../.././gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o In file included from /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: ../.././gcc/gthr-posix.h:43:21: error: pthread.h: No such file or directory ../.././gcc/gthr-posix.h:44:20: error: unistd.h: No such file or directory In file included from /usr/ports/devel/cross-gcc/work/gcc-4.2.3/host-i386-portbld-freebsd7.1/gcc/gthr-default.h:1, from ../.././gcc/gthr.h:114, from ../.././gcc/unwind-dw2.c:42: ../.././gcc/gthr-posix.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_key_t' ../.././gcc/gthr-posix.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_once_t' ../.././gcc/gthr-posix.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_mutex_t' ../.././gcc/gthr-posix.h:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__gthread_recursive_mutex_t' ../.././gcc/gthr-posix.h:92: error: 'pthread_once' undeclared here (not in a function) ../.././gcc/gthr-posix.h:93: error: 'pthread_getspecific' undeclared here (not in a function) Thank you in advance Xavier