Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #15428 (closed defect: fixed)

Opened 5 months ago

Last modified 2 weeks ago

octave-ann 1.0 - Build failure - ld: symbol(s) not found

Reported by: alakazam@… Owned by: andrea.damore@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.6.0
Keywords: Cc: simon@…, raimue@…
Port:

Description

The octave-ann port does not build correctly, failing with a ld: symbol(s) not found error. I am attaching the output showing the error.

Attachments

port-output.log (11.7 kB) - added by alakazam@… 5 months ago.
full-output.log (27.4 kB) - added by alakazam@… 4 months ago.
error-log-_wrap_annDist.log (40.7 kB) - added by alakazam@… 4 months ago.

Change History

Changed 5 months ago by alakazam@…

Changed 4 months ago by simon@…

  • cc simon@… added
  • owner changed from macports-tickets@… to andrea.damore@…

Assigned to maintainer.

Changed 4 months ago by alakazam@…

As requested by the maintainer, I am attaching the _full_ debug output, instead of simply the build phase output.

Changed 4 months ago by raimue@…

  • cc raimue@… added

anddam asked me for assistance to this on IRC today.

You didn't add a full build output here, please run port clean octave-ann and then save the output of port -d install octave-ann 2>&1 > full-output.log.

Just out of interest, do you have the port gcc40 installed?

Changed 4 months ago by alakazam@…

I do not have the gcc40 port installed :

% port installed gcc40
None of the specified ports are installed.

I have replaced the full-output.log with the output obtained _after_ port clean --all octave-ann, per your request.

Changed 4 months ago by alakazam@…

Changed 4 months ago by andrea.damore@…

I had (and I'm still having) connection problem, that's why I didn't replied earlier.

From your first output it is obvious that the compiler is not able to find a function from libstdc++ , what's not obvious is the reason why. I asked for a complete output in the hope that some environment variable was affecting the build, we needed a clean in order to see configure phase environment that is skipped unless one doesn't perform a clean or turn back to patch phase, not just build.

That said I'm not sure how to handle this. Your failing build line, no. 251 in full-output.log, is exactly the same I get on my computer apart "powerpc" instead of "i386" in lib search paths.

Do you happen to have some unusual env variable?

Try appending -lstdc++ to cxxflags, it shouldn't harm and you can't build anyway at the moment.

Changed 4 months ago by alakazam@…

Do you mean to my shell environment $CXXFLAGS ? I was under the impression that those variables were reset to their default values in the context of the port command ? I am not sure I understand where you wish me to append -lstdc++ to cxxflags, I guess you mean in the Portfile ? (but would like to make sure :) ).

Changed 4 months ago by andrea.damore@…

Yes, I meant in the portfile. To brief it and assuming vi is your default editor:

port edit octave-ann

eventually prepended by "sudo",
move to a blank line,
type 'i' without the quotes
write

configure.cxxflags-append       " -lstdc++ "

to exit insert mode type ESC,
to save and leave type ':wq' without quotes and ENTER

Changed 4 months ago by alakazam@…

Humh, that was *very* didactic ;) Sorry to have made you detail things this much ; I didn't need that much detail :D

Anyway, adding

configure.cxxflags-append       " -lstdc++ "

to the portfile didn't change the errors I am encountering. I am not sure how to debug this problem, though. Is it possible to list all the files that are effectively searched for linking ?

Changed 4 months ago by alakazam@…

Ok, it may be that things are compiling with gcc 4.2 due to the env bug in leopard-tcl... I'm currently checking out macports-source, and will see if the bug is still present with the latest trunk version.

Changed 4 months ago by alakazam@…

It would seem that macports-trunk indeed solves this problem ; octave-ann simply doesn't build correctly with gcc42.

I am encountering a new problem when building octave-ann though :

/usr/bin/g++-4.0 -c -I/opt/local/include -fPIC -I/opt/local/include/octave-3.0.1 -I/opt/local/include/octave-3.0.1/octave -I/opt/local/include -mieee-fp -O2 -I../include -DHAVE_OCTAVE_30 ann_wrap.cpp -o ann_wrap.o
ann_wrap.cpp: In function 'octave_value_list _wrap_annDist(const octave_value_list&, int)':
ann_wrap.cpp:2266: error: expected type-specifier before 'ANN_exception'
ann_wrap.cpp:2266: error: expected `)' before '&' token
ann_wrap.cpp:2266: error: expected `{' before '&' token
ann_wrap.cpp:2266: error: 'e' was not declared in this scope
... [snip : lots of similar errors follow, will include a full debug log] ...

Changed 4 months ago by alakazam@…

Changed 3 months ago by andrea.damore@…

Sorry for delay in replying. alakazam can you build octave-ann at all using gcc40 rather than 4.2 ?

Changed 3 months ago by alakazam@…

I'm not sure what you mean by "at all", but I have just updated macports to the latest trunk, gcc_selected gcc40 (shouldn't change the compiler used by macports if I'm not mistaken), port cleaned octave-ann, and tried installing octave-ann, and I still get the same error log :

Command output: ann_wrap.cpp:9051: error: '_wrap_ann_average_err_set' was not declared in this scope
...
ann_wrap.cpp:9503: error: expected `}' at end of input

Changed 3 months ago by andrea.damore@…

I meant "in any way" as the previous message seemed to suggest that the package didn't build only with gcc42, anyway you made it clear with your following message.

Changed 2 weeks ago by andrea.damore@…

  • status changed from new to closed
  • resolution set to fixed

I'm closing this as fixed, for the new problem please open a new ticket.

Note: See TracTickets for help on using tickets.