Opened 16 years ago

Closed 15 years ago

#19146 closed defect (fixed)

llvm-gcc42 fails to build

Reported by: varkentje@… Owned by: erickt@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: llvm-gcc42

Description

Port llvm-gcc42 fails because it cannot find a type definition for AnchorDesc. This is on MacPorts-1.7.1 with all installed ports upgraded.

 sudo port install llvm-gcc42
--->  Fetching llvm-gcc42
--->  Attempting to fetch llvm-gcc-4.2-2.4.source.tar.gz from http://trd.no.distfiles.macports.org/llvm-gcc42
--->  Verifying checksum(s) for llvm-gcc42
--->  Extracting llvm-gcc42
--->  Configuring llvm-gcc42
--->  Building llvm-gcc42
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-gcc42/work/build" && make all " returned error 2
Command output: ../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:72: error: ISO C++ forbids declaration of 'AnchorDesc' with no type
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:72: error: expected ';' before '*' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:73: error: ISO C++ forbids declaration of 'AnchorDesc' with no type
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:73: error: expected ';' before '*' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:74: error: 'DebugInfoDesc' was not declared in this scope
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:74: error: template argument 1 is invalid
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:74: error: template argument 2 is invalid
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:76: error: ISO C++ forbids declaration of 'SubprogramDesc' with no type
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:76: error: expected ';' before '*' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:87: error: expected ';' before '(' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:91: error: expected ';' before '(' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:121: error: ISO C++ forbids declaration of 'TypeDesc' with no type
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:121: error: expected ';' before '*' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:125: error: ISO C++ forbids declaration of 'CompileUnitDesc' with no type
../../llvm-gcc4.2-2.4.source/gcc/llvm-debug.h:125: error: expected ';' before '*' token
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp: In function 'void createOptimizationPasses()':
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:411: error: 'createAddReadAttrsPass' was not declared in this scope
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:472: error: expected type-specifier before 'PrintModulePass'
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:472: error: expected `)' before 'PrintModulePass'
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:472: error: no matching function for call to 'llvm::PassManager::add(int*)'
/opt/local/lib/llvm/src/include/llvm/PassManager.h:57: note: candidates are: virtual void llvm::PassManager::add(llvm::Pass*)
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp: In function 'void llvm_asm_file_end()':
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:660: error: expected type-specifier before 'PrintModulePass'
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:660: error: expected `)' before 'PrintModulePass'
../../llvm-gcc4.2-2.4.source/gcc/llvm-backend.cpp:660: error: no matching function for call to 'llvm::PassManager::add(int*)'
/opt/local/lib/llvm/src/include/llvm/PassManager.h:57: note: candidates are: virtual void llvm::PassManager::add(llvm::Pass*)
make[3]: *** [llvm-backend.o] Error 1
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

Error: Status 1 encountered during processing.

Change History (9)

comment:1 Changed 16 years ago by varkentje@…

Cc: varkentje@… added

Cc Me!

comment:2 Changed 16 years ago by varkentje@…

Additional info:

Mac OS X 10.5.6 (Intel) Xcode 3.1.2

comment:3 Changed 16 years ago by mf2k (Frank Schima)

Cc: varkentje@… removed
Owner: changed from macports-tickets@… to erickt@…

comment:4 Changed 16 years ago by erickt@…

I updated llvm-gcc42 to version 2.5 just the other day. Could you try resyncing with macports and rebuilding?

comment:5 Changed 16 years ago by varkentje@…

I just did the following:

$ sudo port clean --all llvm-gcc42
$ sudo port upgrade installed
$ sudo port install llvm-gcc42

but the llvm-gcc42 build aborts with the exact same error message.

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

We are probably not seeing the first error in this output. MacPorts only shows the last 30 lines of output. Please try again with the debug switch to show all output:

sudo port clean llvm-gcc42
sudo port -d install llvm-gcc42 2>&1 | tee ~/Desktop/llvm.txt

Then you can find llvm.txt on your desktop and attach it to this ticket.

comment:7 Changed 16 years ago by varkentje@…

Ok, that reveals the following issue. In gcc/llvm-debug.h the class DISerialize is instantiated. In llvm releases <= 2.4 this class is defined in llvm-2.4/include/llvm/MachineModuleInfo.h. But the class has disappeared completely from llvm release >= 2.5 ...

See http://llvm.sourcearchive.com/documentation/2.4/MachineModuleInfo_8h-source.html#l00769

Conclusion: the llvm-gcc42 that my MacPorts downloaded is still at <= 2.4.

SOLVED: Today I tried resyncing again and this time llvm-gcc42 builds fine. I suspect that my previous two macports syncs happened during the window where the archive had llvm-2.5 and llvm-gcc42-2.4.

comment:8 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:9 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.