Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#15428 closed defect (fixed)

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

Reported by: alakazam@… Owned by: andrea.damore@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: simon@…, raimue (Rainer Müller)
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 (3)

port-output.log (11.7 KB) - added by alakazam@… 16 years ago.
full-output.log (27.4 KB) - added by alakazam@… 16 years ago.
error-log-_wrap_annDist.log (40.7 KB) - added by alakazam@… 16 years ago.

Download all attachments as: .zip

Change History (18)

Changed 16 years ago by alakazam@…

Attachment: port-output.log added

comment:1 Changed 16 years ago by simon@…

Cc: simon@… added
Owner: changed from macports-tickets@… to andrea.damore@…

Assigned to maintainer.

comment:2 Changed 16 years ago by alakazam@…

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

comment:3 Changed 16 years ago by raimue (Rainer Müller)

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?

comment:4 Changed 16 years 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 16 years ago by alakazam@…

Attachment: full-output.log added

comment:5 Changed 16 years 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.

comment:6 Changed 16 years 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 :) ).

comment:7 Changed 16 years 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

comment:8 Changed 16 years 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 ?

comment:9 Changed 16 years 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.

comment:10 Changed 16 years 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 16 years ago by alakazam@…

Attachment: error-log-_wrap_annDist.log added

comment:11 Changed 16 years ago by andrea.damore@…

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

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

comment:13 Changed 16 years 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.

comment:14 Changed 16 years ago by andrea.damore@…

Resolution: fixed
Status: newclosed

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

comment:15 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.