www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5334] New: FTBFS using GCC-4.5 and linux.mak

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334

           Summary: FTBFS using GCC-4.5 and linux.mak
           Product: D
           Version: D1 & D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: make
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: ibuclaw ubuntu.com



Seems to be a trivial ordering problem in the makefile. And there are missing
references to symbols from -lm and -lstdc++.

Using GCC-4.5 to build from source.


--- dmd~/linux.mak  2010-11-24 01:33:15.143822000 +0000
+++ dmd/linux.mak       2010-12-09 13:38:40.908718003 +0000
   -94,7 +94,7   
 all: dmd

 dmd: $(DMD_OBJS)
-       $(CC) $(MODEL) -lpthread $(COV) $(DMD_OBJS) -o dmd
+       $(CC) $(MODEL) $(COV) $(DMD_OBJS) -lm -lpthread -lstdc++ -o dmd

 clean:
        rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \


Regards

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334




17:10:43 PST ---
The linux.mak line is:

dmd: $(DMD_OBJS)
        gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd

which doesn't match your --- dmd~/linux.mak. So I am wondering where your
linux.mak came from.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334




Created an attachment (id=847)
make log

Ah, probably serves me right for manually changing it back before making that
diff. I still stand by the ftbfs though.

Unzipped dmd2050, and attaching output of 'gcc $(MODEL) -lstdc++ -lpthread
$(COV) $(DMD_OBJS) -o dmd'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334




Changing

gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd

to

gcc $(MODEL) $(COV) $(DMD_OBJS) -lstdc++ -lpthread -o dmd

Yields:

/usr/bin/ld: evalu8.o: undefined reference to symbol 'fetestexcept  GLIBC_2.1'
/usr/bin/ld: note: 'fetestexcept  GLIBC_2.1' is defined in DSO /lib/libm.so.6
so try adding it to the linker command line
/lib/libm.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [dmd] Error 1


Hence the added -lm

Regards

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334




And version dump:

$ gcc --version
gcc (Ubuntu/Linaro 4.5.1-10ubuntu3) 4.5.2
Copyright (C) 2010 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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 09 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5334


Iain Buclaw <ibuclaw ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME



Seems to be OK now. Probably fixed through some part of the binutils updates
I've been seeing recently.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 26 2011