Opened 5 months ago

Closed 4 days ago

#69956 closed defect (fixed)

xmms2 fails to configure: err: ld: unknown option: -Bstatic

Reported by: barracuda156 Owned by: Sergey Fedorov <barracuda@…>
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: cooljeanius (Eric Gallager)
Port: xmms2

Description

The port fails to configure:

--->  Configuring xmms2
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_xmms2/xmms2/work/xmms2-0.8DrO_o" && /opt/local/bin/python2.7 ./waf configure --prefix=/opt/local --conf-prefix=/opt/local --no-cython --without-optionals xmmsclient++,xmmsclient++-glib --without-optionals perl --without-optionals ruby --without-optionals mdns --without-plugins=daap --without-plugins=pulse --without-plugins=jack --nocache 
Setting top to                           : /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_xmms2/xmms2/work/xmms2-0.8DrO_o 
Setting out to                           : /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_xmms2/xmms2/work/xmms2-0.8DrO_o/_build_ 
Platform code for posix                  : ok 
Checking for program gcc,cc              : /usr/bin/gcc-4.2 
Checking for program ar                  : /opt/local/bin/ar 
Checking for program g++,c++             : /usr/bin/g++-4.2 
git commit id                            : Unknown 
uncommited changed                       : no 
Checking for compiler flags -Wall        : no 
Checking for compiler flags -Wempty-body : no 
Checking for compiler flags -Wformat=2   : no 
Checking for compiler flags -Wformat-nonliteral : no 
Checking for compiler flags -Wformat-security   : no 
Checking for compiler flags -Wignored-qualifiers : no 
Checking for compiler flags -Wmissing-prototypes : no 
Checking for compiler flags -Wstrict-prototypes  : no 
Checking for compiler flags -Wtype-limits        : no 
Checking for compiler flags -Wwrite-strings      : no 
Checking for compiler flags -Wformat-extra-args  : no 
Checking for compiler flags -Wformat-zero-length : no 
Checking for compiler flags -fdiagnostics-show-option : no 
Checking for compiler flags -fdiagnostics-show-option : no 
Checking for compiler flags -Werror=implicit-function-declaration : no 
Checking for program pkg-config                                   : /opt/local/bin/pkg-config 
Checking for 'glib-2.0'                                           : yes 
Checking for 'speex'                                              : yes 
Checking for 'ogg'                                                : yes 
Checking for library m                                            : not found 
Checking for 'libxml-2.0'                                         : yes 
Checking for header sys/soundcard.h                               : not found 
Checking for 'ao'                                                 : yes 
Checking for 'vorbisfile'                                         : yes 
Checking for library m                                            : not found 
Checking for function fstatat                                     : not found 
Checking for 'sndfile'                                            : yes 
Checking for 'wavpack'                                            : yes 
Checking for 'libcurl'                                            : yes 
Checking for function curl_multi_strerror                         : not found 
Checking for header mpc/mpcdec.h                                  : not found 
Checking for header mpcdec/mpcdec.h                               : not found 
Checking for 'shout'                                              : yes 
Checking for 'ogg'                                                : yes 
Checking for 'vorbisenc'                                          : yes 
Checking for header libsmbclient.h                                : not found 
Checking for 'libavcodec'                                         : yes 
Checking for header avcodec.h                                     : not found 
Checking for header libavcodec/avcodec.h                          : not found 
Checking for function avcodec_free_frame                          : no 
Checking for 'libcdio_cdda'                                       : yes 
Checking for 'libdiscid'                                          : yes 
Checking for header sys/select.h                                  : not found 
Checking for 'libgme'                                             : not found 
Checking for header gme/gme.h                                     : not found 
Checking for 'libmpg123' >= 1.5.1                                 : yes 
Testing mpg123 with default off_t                                 : failed 
Testing mpg123 with large off_t                                   : failed 
Checking for 'sc68' >= 2.3.0                                      : not found 
Checking for 'libsidplay2'                                        : not found 
Checking for 'gio-2.0'                                            : yes 
Checking for 'alsa'                                               : not found 
Checking for header AudioUnit/AudioUnit.h                         : not found 
Checking for 'neuros-cooler-media'                                : not found 
Checking for 'mms'                                                : not found 
Checking for 'libmms'                                             : yes 
Checking for header mac/All.h                                     : not found 
Checking for 'mad'                                                : yes 
Checking for 'flac'                                               : yes 
Checking for header tremor/ivorbisfile.h                          : not found 
Checking for library m                                            : not found 
Checking for 'libxml-2.0'                                         : yes 
Checking for 'libofa'                                             : yes 
Checking for library m                                            : not found 
Checking for library m                                            : not found 
Checking for header windows.h                                     : not found 
Checking for 'fftw3f'                                             : yes 
Checking for 'samplerate'                                         : yes 
Checking for 'modplug'                                            : not found 
Checking for 'libmodplug'                                         : yes 
Checking for program valgrind                                     : not found 
Checking for program lcov                                         : not found 
Checking for program genhtml                                      : not found 
Checking for header CUnit/CUnit.h                                 : not found 
Checking for 'ecore'                                              : not found 
Checking for header ['stdio.h', 'readline/readline.h']            : not found 
Checking for program python                                       : /opt/local/bin/python2.7 
python executable '/opt/local/bin/python2.7' different from sys.executable '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
Checking for python version                                       : 2.7.18 
Checking for library python2.7 in LIBPATH_PYEMBED                 : not found 
Checking for library python2.7 in LIBDIR                          : not found 
Checking for library python2.7 in python_LIBPL                    : not found 
Checking for library python2.7 in $prefix/libs                    : not found 
Checking for library python27 in LIBPATH_PYEMBED                  : not found 
Checking for library python27 in LIBDIR                           : not found 
Checking for library python27 in python_LIBPL                     : not found 
Checking for library python27 in $prefix/libs                     : not found 
Checking for program python2.7-config,python-config-2.7,python2.7m-config : /opt/local/bin/python2.7-config 
Checking for header Python.h                                              : Could not find the python development headers 
Checking for '/opt/local/bin/python2.7-config'                            : yes 
Getting the python flags from python-config                               : Could not find the python development headers elsewhere 
Checking for library m                                                    : not found 
Checking for 'vorbisenc'                                                  : yes 
Checking for 'vorbis'                                                     : yes 
Checking for 'ogg'                                                        : yes 
Checking for 'libvisual-0.4'                                              : not found 
Checking for 'gio-2.0'                                                    : yes 
Checking for 'gthread-2.0'                                                : yes 
Checking for function g_file_query_file_type                              : not found 
Checking for 'gmodule-2.0' >= 2.6.0                                       : yes 
Checking for 'gthread-2.0' >= 2.6.0                                       : yes 
Checking for 'sqlite3' >= 3.5                                             : yes 
Checking for function sin                                                 : not found 
The configuration failed

The config log suggests the build passes a weird linker flag:

err: ld: unknown option: -Bstatic

Attachments (1)

config.log (170.1 KB) - added by barracuda156 5 months ago.

Download all attachments as: .zip

Change History (10)

Changed 5 months ago by barracuda156

Attachment: config.log added

comment:1 Changed 4 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:2 Changed 13 days ago by barracuda156

UPD. As often the case, it is wrong portfile code is breaking the build: -Wno-error=incompatible-function-pointer-types is a clangism, but used unconditionally.

comment:3 Changed 13 days ago by kencu (Ken)

there is no expectation for contributors to test on anything other than clang, and on the last three systems.

to have ports work on older systems or with nonstandard compilers, people who use those systems are expected to add useful and acceptable modifications.

So no point being snippy. The Portfile code is not wrong — just has to be tweaked for corner cases.

comment:4 in reply to:  3 ; Changed 13 days ago by barracuda156

Replying to kencu:

there is no expectation for contributors to test on anything other than clang, and on the last three systems.

to have ports work on older systems or with nonstandard compilers, people who use those systems are expected to add useful and acceptable modifications.

So no point being snippy. The Portfile code is not wrong — just has to be tweaked for corner cases.

A good practice is to add flags unconditionally when one is sure they work for all supported systems. Since the failure was with some clang and no testing done with gcc (which is okay), the flag should have been added conditionally on the compiler being clang. This would not require any exotic hardware or special knowledge, just a couple of extra lines of code.

comment:5 in reply to:  2 ; Changed 13 days ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

-Wno-error=incompatible-function-pointer-types is a clangism, but used unconditionally.

This flag was added to the port on May 17 so I don't think it is responsible for the error message err: ld: unknown option: -Bstatic reported in this ticket on May 12.

comment:6 Changed 13 days ago by barracuda156

Anyway, this fixes the build with gcc, on < 10.7 and variants which do not work correctly now: https://github.com/macports/macports-ports/pull/25983

comment:7 in reply to:  5 Changed 13 days ago by barracuda156

Replying to ryandesign:

Replying to barracuda156:

-Wno-error=incompatible-function-pointer-types is a clangism, but used unconditionally.

This flag was added to the port on May 17 so I don't think it is responsible for the error message err: ld: unknown option: -Bstatic reported in this ticket on May 12.

Thank you, Ryan. This is interesting, and I have no idea now what caused that earlier error then.

comment:8 in reply to:  4 Changed 13 days ago by kencu (Ken)

Replying to barracuda156:

A good practice is to add flags unconditionally when one is sure they work for all supported systems. Since the failure was with some clang and no testing done with gcc (which is okay), the flag should have been added conditionally on the compiler being clang.

This is not the way MacPorts has expected contributors do things.

If someone adding a flag knows ahead of time that it is not supported by gcc, OK, they can can add conditional code -- if they choose to. It's not a requirement to support gcc, or wrong if they don't.

But otherwise, contributors can add a flag unconditionally if it passes CI.

If it turns out later that gcc doesn't support it, or some ancient clang doesn't support it, that can be fixed later.

comment:9 Changed 4 days ago by Sergey Fedorov <barracuda@…>

Owner: set to Sergey Fedorov <barracuda@…>
Resolution: fixed
Status: newclosed

In fe41bf1e61366bb2c733478bef6e04bf5756dc23/macports-ports (master):

xmms2: unbreak build with gcc

Closes: #69956

Note: See TracTickets for help on using tickets.