Ticket #32947 (closed defect: fixed)
alliance: non-void function 'elpLotrsShrink' should return a value
| Reported by: | yannick.heinrich@… | Owned by: | and.damore@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 2.0.3 |
| Keywords: | clang | Cc: | |
| Port: | alliance |
Description
The port does not compile on Mac Os X Lion
Attachments
Change History
comment:1 Changed 17 months ago by ryandesign@…
- Owner changed from macports-tickets@… to and.damore@…
- Keywords clang added
- Port set to alliance
- Summary changed from Alliance on Mac Os X lion to alliance: non-void function 'elpLotrsShrink' should return a value
The first error in the log is:
:info:build elp.c:252:1: error: non-void function 'elpLotrsShrink' should return a value [-Wreturn-type]
I also see you're using clang. This could be because clang is more strict. Have you tried using a different compiler? Let us know if a different one works better and we can fix the port.
comment:2 follow-up: ↓ 3 Changed 17 months ago by yannick.heinrich@…
I tried with 'sudo port install -d alliance configure.compiler=gcc' it compiles but not linked :( I join the log files. Some classes referenced in libU.a are not found
comment:3 in reply to: ↑ 2 Changed 17 months ago by and.damore@…
- Status changed from new to assigned
I confirm I get the same error of the reporter when using clang on 10.7.2 .
Switching to llvm-gcc-4.2 gives a symbol not found error in an archive library
Undefined symbols for architecture x86_64:
"TMatrix<CNode>::operator[](int)", referenced from:
CMatrixNodes::obstacle(CRect&, int) in libU.a(MNodes.o)
CMatrixPri::findfree(int, CNet&) in libU.a(MPri.o)
CMatrixNodes::check(bool) in libU.a(AAstar.o)
"TMatrix<char>::operator[](int)", referenced from:
CMatrixPri::findfree(int, CNet&) in libU.a(MPri.o)
operator<<(std::basic_ostream<char, std::char_traits<char> >&, CMatrixPri&)in libU.a(MPri.o)
CMatrixPri::take(int, int)in libU.a(MPri.o)
CMatrixPri::load(CNet&, bool, int)in libU.a(MPri.o)
ld: symbol(s) not found for architecture x86_64
Using apple-gcc42 compiler comletes the build just fine.
I think we should force apple-gcc42 on Lion and report the issue with different compilers upstream.
comment:4 follow-up: ↓ 5 Changed 17 months ago by yannick.heinrich@…
I tried to force with sudo port -d install alliance configure.compiler=apple-gcc42 but it tells me that the value is incorrect. Itried with sudo port -d install alliance configure.compiler=apple-gcc-4.2 but I get the same linking error :(
comment:5 in reply to: ↑ 4 Changed 17 months ago by and.damore@…
Replying to yannick.heinrich@…:
I tried to force with sudo port -d install alliance configure.compiler=apple-gcc42 but it tells me that the value is incorrect.
The port name is apple-gcc42, the configure.compiler value to trigger its use is apple-gcc-4.2 so the option becomes configure.compiler=apple-gcc-4.2.
I tried with sudo port -d install alliance configure.compiler=apple-gcc-4.2 but I get the same linking error :(
Please clean the port, clear terminal buffer and re-run
sudo port install foo configure.compiler=apple-gcc-4.2 configure.cxx=g++-apple-4.2
save the output and attach it.
Notice the C++ compiler option as per the link Ryan provided, alliance is using it.
comment:6 Changed 17 months ago by yannick.heinrich@…
It compiles fine and seems to work good :) Thanks your great help !

