Opened 12 years ago

Closed 12 years ago

Last modified 6 years ago

#32947 closed defect (fixed)

alliance: non-void function 'elpLotrsShrink' should return a value

Reported by: yannick.heinrich@… Owned by: anddam (Andrea D'Amore)
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 (3)

alliance_main.log (560.2 KB) - added by yannick.heinrich@… 12 years ago.
alliance_gcc_config.log (91.5 KB) - added by yannick.heinrich@… 12 years ago.
alliance_gcc_main.log (184.9 KB) - added by yannick.heinrich@… 12 years ago.

Download all attachments as: .zip

Change History (11)

Changed 12 years ago by yannick.heinrich@…

Attachment: alliance_main.log added

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: clang added
Owner: changed from macports-tickets@… to and.damore@…
Port: alliance added
Summary: Alliance on Mac Os X lionalliance: 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 Changed 12 years 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

Changed 12 years ago by yannick.heinrich@…

Attachment: alliance_gcc_config.log added

Changed 12 years ago by yannick.heinrich@…

Attachment: alliance_gcc_main.log added

comment:3 in reply to:  2 Changed 12 years ago by anddam (Andrea D'Amore)

Status: newassigned

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 Changed 12 years 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 :(

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  4 Changed 12 years ago by anddam (Andrea D'Amore)

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.

Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 12 years ago by yannick.heinrich@…

It compiles fine and seems to work good :) Thanks your great help !

comment:7 Changed 12 years ago by anddam (Andrea D'Amore)

Resolution: fixed
Status: assignedclosed

Committed r89248, ticket closed.

comment:8 Changed 12 years ago by anddam (Andrea D'Amore)

This has been further edited in r89292, now it will compile with clang as well. You may want to uninstall apple-gcc42 if not needed.

Note: See TracTickets for help on using tickets.