Opened 13 years ago

Closed 13 years ago

#27655 closed defect (fixed)

pianobar: unrecognized option '-shared'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: aguynamedryan+pianobar@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: pianobar

Description

pianobar fails to build on Tiger:

/usr/bin/gcc-4.0 -arch i386 -shared -Wall -g -std=c99 -pedantic libpiano/src/crypt.lo libpiano/src/piano.lo libpiano/src/xml.lo libwaitress/src/waitress.lo \
                libezxml/src/ezxml.lo -o libpiano.so.0.0.0
i686-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
make: *** [libpiano] Error 1
make: *** Waiting for unfinished jobs....
shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_audio_pianobar/work/pianobar-2010.11.06" && /usr/bin/make -j2 all CC="/usr/bin/gcc-4.0 -arch i386" PREFIX=/opt/local LIBAO_INCLUDE=/opt/local/include LIBFAAD_INCLUDE=/opt/local/include LIBMAD_INCLUDE=/opt/local/include " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
DEBUG: Backtrace: shell command failed (see log for details)
Warning: the following items did not execute (for pianobar): org.macports.activate org.macports.build org.macports.destroot org.macports.install

"-shared" is a flag that is used on other UNIX systems, but on Mac OS X, "-dynamiclib" is used instead. Recent versions of Mac OS X allow "-shared" as a synonym for "-dynamiclib", but Tiger is not recent enough for that. The attached patch fixes this.

However, the dynamic library that's being built here doesn't actually end up getting installed -- and pianobar works fine without it. So I'm unsure why the dynamic library is being built at all, and maybe a better patch would be one that disables building the dynamic library.

Attachments (2)

pianobar-dynamiclib.diff (1.0 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
one possible solution
pianobar-build-target.diff (425 bytes) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
another possible solution

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: pianobar-dynamiclib.diff added

one possible solution

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: pianobar-build-target.diff added

another possible solution

comment:1 in reply to:  description Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

maybe a better patch would be one that disables building the dynamic library.

...like this.

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Actually this was a problem on Leopard too (different error message). Committed my second, simpler patch in r74466.

Note: See TracTickets for help on using tickets.