Opened 12 years ago

Closed 12 years ago

#32115 closed defect (fixed)

pianobar: fails to build with clang

Reported by: aguynamedryan+macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch clang Cc: dyoung@…, ryandesign (Ryan Carsten Schmidt), ibtaylor@…
Port: pianobar

Description

I just upgraded to Lion and decided to do a fresh install of MacPorts. pianobar failed to build with the following error:

:info:build In file included from src/settings.c:38:
:info:build In file included from src/settings.h:28:
:info:build src/libwaitress/waitress.h:30:10: fatal error: 'gnutls/gnutls.h' file not found
:info:build #include <gnutls/gnutls.h>
:info:build          ^

Looks like pianobar isn't seeing the /opt/local files. I've patched the Portfile so that it sets a -I and -L flag for the compiler. I also drop the now-unsused LIB*_INCLUDE variables

Attachments (3)

pianobar2011-11-11_1.diff (1.2 KB) - added by aguynamedryan+macports@… 12 years ago.
Portfile patch
main.log (21.5 KB) - added by aguynamedryan+macports@… 12 years ago.
log with error if anyone is curious
pianobar.diff (1.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
proposed patch

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by aguynamedryan+macports@…

Attachment: pianobar2011-11-11_1.diff added

Portfile patch

Changed 12 years ago by aguynamedryan+macports@…

Attachment: main.log added

log with error if anyone is curious

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

Keywords: haspatch added

Replying to aguynamedryan+macports@…:

Looks like pianobar isn't seeing the /opt/local files.

Probably because clang doesn't use CPATH or LIBRARY_PATH.

I've patched the Portfile so that it sets a -I and -L flag for the compiler. I also drop the now-unsused LIB*_INCLUDE variables

The revision should not be increased because this doesn't change the files that get installed, right?

I'm attaching a revised patch of how I would do this. What do you think?

I'm also removing the pre-destroot deletion of INSTALL, not necessary because the Makefile already declares install as a .PHONY target.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: pianobar.diff added

proposed patch

comment:2 Changed 12 years ago by dyoung@…

Cc: dyoung@… added

Cc Me!

comment:3 in reply to:  description ; Changed 12 years ago by ibtaylor@…

Adding the last two lines to build.args works for me.

build.args                  CC="${configure.cc} [get_canonical_archflags]" \
                            PREFIX=${prefix} \
                            CFLAGS=-std=c99 \
                            LIBAO_INCLUDE=${prefix}/include \
                            LIBFAAD_INCLUDE=${prefix}/include \
                            LIBMAD_INCLUDE=${prefix}/include \
                            LIBGNUTLS_CFLAGS="[exec pkg-config --cflags gnutls]" \
                            LIBGNUTLS_LDFLAGS="[exec pkg-config --libs gnutls]"

Really, it seems like ao, faad, mad, should be handled with pkg-config as well.

comment:4 in reply to:  3 ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ibtaylor@…:

Adding the last two lines to build.args works for me.

Are you saying that the patch I attached above did not work?

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

Cc: ryandesign@… ibtaylor@… added

ibtaylor, please see my remark in the ticket.

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

Keywords: clang added
Summary: pianobar 2011.11.11 fails to buildpianobar: fails to build with clang

Replying to ryandesign@…:

I'm also removing the pre-destroot deletion of INSTALL, not necessary because the Makefile already declares install as a .PHONY target.

r88248.

comment:7 in reply to:  4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Replying to ryandesign@…:

Are you saying that the patch I attached above did not work?

It seems to work for me, so I'm committing it in r88249. But I don't have Lion / Xcode 4.2, so please let me know if this works for you now or not.

Note: See TracTickets for help on using tickets.