Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Compilation errors on OS X

Moderators: kris

Posted: 06/03/07 15:59:28

Hej,

I tried to install Tango on OS X using gdc (gdc r110):

u@koala:~/Programmieren/D/tango/lib$ gdc --version
gdc (GCC) 4.0.4 (gdc 0.23, using dmd 1.007)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Unfortunately I get errors messages. They have been mentioned on this site before but the answer was to just wait for the next relases. BTW, I'm running on trunk (r2276 to be exact). Anyway, I get the following result:

u@koala:~/Programmieren/D/tango/lib$ ./build-gdc.sh 
~/Programmieren/D/tango/lib/compiler/gdc ~/Programmieren/D/tango/lib
checking build system type... i386-apple-darwin8.9.1
checking host system type... i386-apple-darwin8.9.1
checking target system type... i386-apple-darwin8.9.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet.  If you think this
configuration is useful to you, please write to autoconf@gnu.org.
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
./configure: line 3992: test: =: unary operator expected
checking If gdc can compile D sources... yes
checking D GCC version... 4.0.4
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking for sizeof(FILE)... yes
checking for sizeof(DIR)... yes
checking for cos in -lm... yes
checking for sqrtf... yes
checking for trunc... yes
checking for nearbyint... yes
checking for round... yes
checking for tgamma... yes
checking for nan... yes
checking for exp2... yes
checking for log2... yes
checking for fpclassify and signbit... yes
checking for execvpe... no
checking for spawnvp... no
checking for fwide... yes
checking for strtold... yes
checking for tm_gmtoff... yes
checking for timezone... no
checking for _timezone... no
checking for snprintf... yes
checking for vsnprintf... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for recursive mutex name... PTHREAD_MUTEX_RECURSIVE
checking for pthread_barrier_t... no
checking for pthread_barrierattr_t... no
checking for pthread_rwlock_t... yes
checking for pthread_rwlockattr_t... yes
checking for pthread_spinlock_t... no
checking for clockid_t... no
checking for thread library linker argument... none needed
checking for socklen_t... yes
checking for siginfo_t... yes
checking for sa_len... yes
checking size of sa_len... one byte
checking for library containing sem_init... none required
checking semaphore.h usability... yes
checking semaphore.h presence... yes
checking for semaphore.h... yes
checking for sem_init... yes
checking for semaphore_create... yes
checking for pthread_cond_wait... yes
checking for mmap... yes
checking for getpwnam_r... yes
checking for mmap... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating frag-ac
config.status: creating phobos-ver-syms
config.status: creating config.h
config.status: config.h is unchanged
~/Programmieren/D/tango/lib
find . -name "*.di" | xargs rm -f
rm -f 
rm -f 
make -C compiler/gdc clean
rm -f aaA.o aApply.o aApplyR.o adi.o arraycast.o arraycat.o cast.o cmain.o critical.o dgccmain2.o genobj.o invariant.o lifetime.o memory.o memset.o monitor.o obj.o qsortg.o rundmain.o switch.o util/console.o util/ctype.o util/string.o util/utf.o std/intrinsic.o memory_dyld.o gcc/configunix.o gcc/cbridge_fdset.o  gcc/cbridge_math.o gcc/support.o gcc/config.o gcc/unwind.o gcc/deh.o gcc/cbridge_time.o typeinfo/ti_AC.o typeinfo/ti_Ag.o typeinfo/ti_Aint.o typeinfo/ti_Along.o typeinfo/ti_Ashort.o typeinfo/ti_C.o typeinfo/ti_byte.o typeinfo/ti_cdouble.o typeinfo/ti_cfloat.o typeinfo/ti_char.o typeinfo/ti_creal.o typeinfo/ti_dchar.o typeinfo/ti_delegate.o typeinfo/ti_double.o typeinfo/ti_float.o typeinfo/ti_idouble.o typeinfo/ti_ifloat.o typeinfo/ti_int.o  typeinfo/ti_ireal.o typeinfo/ti_long.o typeinfo/ti_ptr.o typeinfo/ti_real.o typeinfo/ti_short.o typeinfo/ti_ubyte.o typeinfo/ti_uint.o typeinfo/ti_ulong.o typeinfo/ti_ushort.o typeinfo/ti_wchar.o typeinfo/ti_Afloat.o typeinfo/ti_Adouble.o typeinfo/ti_Areal.o typeinfo/ti_Acfloat.o typeinfo/ti_Acdouble.o typeinfo/ti_Acreal.o typeinfo/ti_void.o    
rm -f aaA.t.o aApply.t.o aApplyR.t.o adi.t.o arraycast.t.o arraycat.t.o cast.t.o cmain.t.o critical.t.o dgccmain2.t.o genobj.t.o invariant.t.o lifetime.t.o memory.t.o memset.t.o monitor.t.o obj.t.o qsortg.t.o rundmain.t.o switch.t.o util/console.t.o util/ctype.t.o util/string.t.o util/utf.t.o std/intrinsic.t.o memory_dyld.t.o gcc/configunix.t.o gcc/cbridge_fdset.t.o  gcc/cbridge_math.t.o gcc/support.t.o gcc/config.t.o gcc/unwind.t.o gcc/deh.t.o gcc/cbridge_time.t.o typeinfo/ti_AC.t.o typeinfo/ti_Ag.t.o typeinfo/ti_Aint.t.o typeinfo/ti_Along.t.o typeinfo/ti_Ashort.t.o typeinfo/ti_C.t.o typeinfo/ti_byte.t.o typeinfo/ti_cdouble.t.o typeinfo/ti_cfloat.t.o typeinfo/ti_char.t.o typeinfo/ti_creal.t.o typeinfo/ti_dchar.t.o typeinfo/ti_delegate.t.o typeinfo/ti_double.t.o typeinfo/ti_float.t.o typeinfo/ti_idouble.t.o typeinfo/ti_ifloat.t.o typeinfo/ti_int.t.o  typeinfo/ti_ireal.t.o typeinfo/ti_long.t.o typeinfo/ti_ptr.t.o typeinfo/ti_real.t.o typeinfo/ti_short.t.o typeinfo/ti_ubyte.t.o typeinfo/ti_uint.t.o typeinfo/ti_ulong.t.o typeinfo/ti_ushort.t.o typeinfo/ti_wchar.t.o typeinfo/ti_Afloat.t.o typeinfo/ti_Adouble.t.o typeinfo/ti_Areal.t.o typeinfo/ti_Acfloat.t.o typeinfo/ti_Acdouble.t.o typeinfo/ti_Acreal.t.o typeinfo/ti_void.t.o   
rm -f unittest.o
rm -f unittest testgc
rm -f config/gen_config1.o config/gen_unix.o config/gen_math.o
rm -f gen_config1 gen_unix gen_math
rm -f frag-gen frag-math frag-unix
rm -f ./gcc/config.d ./gcc/configunix.d
rm -f libgphobos.a
rm -f libgphobos_t.a
test -z "minimal" || rm -f minimal
rm -f *.o
make -C gc/basic -fposix.mak clean CC=gcc DC=gdmd
find . -name "*.di" | xargs rm -f
rm -f gc.o gcalloc.o gcbits.o gcstats.o gcx.o
rm -f 
rm -f libbasic*.a
make -C common/tango -fposix.mak clean CC=gcc DC=gdmd
find . -name "*.di" | xargs rm -f
rm -f core/Exception.o core/Memory.o core/Thread.o core/ThreadASM.o stdc/wrap.o stdc/posix/pthread_darwin.o
rm -f 
find . -name "libtango*.a" | xargs rm -f
make -C compiler/gdc
make "AR_FLAGS=" "CC_FOR_BUILD=" "CC_FOR_TARGET=" "CFLAGS=-I/sw/include" "CXXFLAGS=-I/sw/include" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-L/sw/lib" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=make" "MAKEINFO=/bin/sh /Users/u/Programmieren/D/tango/lib/compiler/gdc/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "includedir=/usr/local/include" "prefix=/usr/local" "tooldir=" "gdc_include_dir=/usr/local/include/d/4.0.4" "AR=ar" "AS=as" "LD=ld" "RANLIB=ranlib" "NM=" "NM_FOR_BUILD=" "NM_FOR_TARGET=" "DESTDIR=" "WERROR=" all-am
gcc -o minimal.o -DHAVE_CONFIG_H -I. -I/sw/include -c minimal.c
cp ./config/darwin8/frag-gen frag-gen
cp ./config/darwin8/frag-math frag-math
cat config/config-head frag-ac frag-gen frag-math config/config-mid config/config-tail stamp-tgtdir > gcc/config.d
cp ./config/darwin8/frag-unix frag-unix
cat config/unix-head frag-unix config/unix-mid stamp-tgtdir > gcc/configunix.d
gdc -o aaA.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c aaA.d
{standard input}:2726:indirect jmp without `*'
{standard input}:2741:indirect jmp without `*'
{standard input}:2756:indirect jmp without `*'
{standard input}:2775:indirect jmp without `*'
gdc -o aApply.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c aApply.d
{standard input}:2454:indirect jmp without `*'
{standard input}:2469:indirect jmp without `*'
{standard input}:2488:indirect jmp without `*'
gdc -o aApplyR.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c aApplyR.d
{standard input}:2818:indirect jmp without `*'
{standard input}:2833:indirect jmp without `*'
gdc -o adi.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c adi.d
{standard input}:1842:indirect jmp without `*'
{standard input}:1857:indirect jmp without `*'
{standard input}:1872:indirect jmp without `*'
{standard input}:1887:indirect jmp without `*'
{standard input}:1902:indirect jmp without `*'
{standard input}:1917:indirect jmp without `*'
{standard input}:1939:indirect jmp without `*'
{standard input}:1961:indirect jmp without `*'
{standard input}:1976:indirect jmp without `*'
gdc -o arraycast.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c arraycast.d
{standard input}:211:indirect jmp without `*'
{standard input}:226:indirect jmp without `*'
{standard input}:241:indirect jmp without `*'
gdc -o arraycat.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c arraycat.d
{standard input}:223:indirect jmp without `*'
{standard input}:238:indirect jmp without `*'
{standard input}:253:indirect jmp without `*'
{standard input}:268:indirect jmp without `*'
gdc -o cast.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c cast.d
{standard input}:764:indirect jmp without `*'
gdc -o cmain.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c cmain.d
{standard input}:114:indirect jmp without `*'
gcc -o critical.o -DHAVE_CONFIG_H -I. -I/sw/include -c critical.c
gdc -o dgccmain2.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c dgccmain2.d
{standard input}:935:indirect jmp without `*'
{standard input}:950:indirect jmp without `*'
{standard input}:965:indirect jmp without `*'
{standard input}:980:indirect jmp without `*'
{standard input}:995:indirect jmp without `*'
{standard input}:1010:indirect jmp without `*'
{standard input}:1025:indirect jmp without `*'
{standard input}:1040:indirect jmp without `*'
{standard input}:1055:indirect jmp without `*'
{standard input}:1070:indirect jmp without `*'
{standard input}:1085:indirect jmp without `*'
{standard input}:1104:indirect jmp without `*'
{standard input}:1119:indirect jmp without `*'
{standard input}:1138:indirect jmp without `*'
{standard input}:1153:indirect jmp without `*'
{standard input}:1168:indirect jmp without `*'
{standard input}:1183:indirect jmp without `*'
{standard input}:1198:indirect jmp without `*'
{standard input}:1217:indirect jmp without `*'
{standard input}:1232:indirect jmp without `*'
{standard input}:1247:indirect jmp without `*'
{standard input}:1262:indirect jmp without `*'
gdc -o genobj.o -g -frelease -O2 -fversion=GC_Use_Alloc_MMap -fversion=GC_Use_Stack_Fixed -fversion=GC_Use_Data_Dyld -nostdinc -pipe -I../../.. -fversion=Posix   \
-c genobj.d
genobj.d:74: class object.Object D compiler and phobos/object.d are mismatched
genobj.d:141: class object.ClassInfo D compiler and phobos/object.d are mismatched
genobj.d:214: class object.TypeInfo D compiler and phobos/object.d are mismatched
genobj.d:284: class object.TypeInfo_Typedef D compiler and phobos/object.d are mismatched
genobj.d:313: class object.TypeInfo_Enum D compiler and phobos/object.d are mismatched
genobj.d:317: class object.TypeInfo_Pointer D compiler and phobos/object.d are mismatched
genobj.d:367: class object.TypeInfo_Array D compiler and phobos/object.d are mismatched
genobj.d:444: class object.TypeInfo_StaticArray D compiler and phobos/object.d are mismatched
genobj.d:529: class object.TypeInfo_AssociativeArray D compiler and phobos/object.d are mismatched
genobj.d:559: class object.TypeInfo_Function D compiler and phobos/object.d are mismatched
genobj.d:584: class object.TypeInfo_Delegate D compiler and phobos/object.d are mismatched
genobj.d:611: class object.TypeInfo_Class D compiler and phobos/object.d are mismatched
genobj.d:674: class object.TypeInfo_Interface D compiler and phobos/object.d are mismatched
genobj.d:737: class object.TypeInfo_Struct D compiler and phobos/object.d are mismatched
genobj.d:841: class object.TypeInfo_Tuple D compiler and phobos/object.d are mismatched
genobj.d:903: class object.Exception D compiler and phobos/object.d are mismatched
genobj.d:945: class object.ModuleInfo D compiler and phobos/object.d are mismatched
make[2]: *** [genobj.o] Error 1
make[1]: *** [all] Error 2
make: *** [lib] Error 2
Author Message

Posted: 06/03/07 16:32:49

Never mind. Use the gdc from http://gdcmac.sourceforge.net/ I was able to compile tango.

Posted: 06/03/07 21:30:17

ujh wrote:

Cool!

Posted: 08/25/07 17:11:48

ujh wrote:

Unfortunately I got the error message back when I installed the new GDC 0.24 (using r2500 of Tango). Is this a known problem?

Posted: 08/25/07 17:43:58

Did you apply the Tango patch in patches/GDC-0.24-SVN-r139.diff ?

Posted: 08/26/07 07:00:30

Carlos wrote:

Thank you very much. Now I have Tango installed!

But when I try to compile the project I'm working on I get this nice error message:

/Users/u/Programmieren/D/tango/tango/core/BitArray.d(13): module BitManip cannot read file 'tango/core/BitManip.d'

Having looked through the wiki and the source I see that there's no tango/core/BitManip.d file. It seems to have moved into the runtime. I can also see that the dsss.conf was changed accordingly (?) but I've used the build-gdc.sh shell script to build and the install-gdc.sh shell script to install Tango. So should I try to use dsss to install Tango or should the shell script be changed?

Posted: 08/26/07 13:50:46

ujh wrote:

But when I try to compile the project I'm working on I get this nice error message:

/Users/u/Programmieren/D/tango/tango/core/BitArray.d(13): module BitManip cannot read file 'tango/core/BitManip.d'

Having looked through the wiki and the source I see that there's no tango/core/BitManip.d file. It seems to have moved into the runtime. I can also see that the dsss.conf was changed accordingly (?) but I've used the build-gdc.sh shell script to build and the install-gdc.sh shell script to install Tango. So should I try to use dsss to install Tango or should the shell script be changed?

I was able to fix that again. I did the following steps:

1. dsss build 1. dsss install 1. install-gdc.sh though I'm not sure that step is necessary and if it uses the stuff built by dsss or if it just uses the stuff build before with build-gdc.sh.

So I assume either the installation page should be updated or the build-gdc.sh script.