Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Move from Travis-CI to Github Actions #215

Merged
merged 1 commit into from
Sep 26, 2020

Conversation

mgeier
Copy link
Member

@mgeier mgeier commented Sep 18, 2020

I also tried using GCC on macOS, but didn't manage to make it work (because of linker errors probably caused by incompatible standard libraries).

If somebody has an idea how to use GCC, please let me know.
If not, it's not a problem, I guess most people use Xcode anyway.

@mgeier mgeier merged commit 9e2b019 into SoundScapeRenderer:master Sep 26, 2020
@mgeier mgeier deleted the github-action branch September 26, 2020 13:37
@mgeier mgeier mentioned this pull request Sep 26, 2020
@HaHeho
Copy link
Contributor

HaHeho commented Sep 29, 2020

I had no problem building with GCC on macOS (never even tried Xcode).

If I understand correctly macOS comes with a GCC version. In my case

/usr/bin/gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Alternativly, there is also the option to get GCC via Homebrew. That version currently is

brew info gcc
gcc: stable 10.2.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/10.2.0 (1,463 files, 338.7MB) *
  Poured from bottle on 2020-09-03 at 21:44:24
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb
License: GPL-3.0
==> Dependencies
Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔

Is there anything that I can do in terms of testing in case you want to integrate a GCC build path for macOS back into the CI?

@HaHeho
Copy link
Contributor

HaHeho commented Sep 29, 2020

BTW, I think I built with the shipped macOS version of GCC, due to not closely paying attention to which one is used. I don't know if is recommended to use the (I assume more recent) Homebrew version. Or if that makes a difference in terms of building / usability experience.

@mgeier
Copy link
Member Author

mgeier commented Sep 29, 2020

Thanks for following up on this!

/usr/bin/gcc is not GCC. It's clang in disguise:

Apple clang version 12.0.0 (clang-1200.0.32.2)

All the tested Xcode versions actually call gcc and g++, which are in reality clang and clang.

To show that, I included this section:

- name: Check compiler versions
run: |
which ${CC:-gcc}
${CC:-gcc} --version
which ${CXX:-g++}
${CXX:-g++} --version

To use the real GCC, I guess you can specify some custom brew-generated full path or, as I tried, use an executable with a version number, e.g. g++-9.

The version check will then show something like this:

/usr/local/bin/gcc-9
gcc-9 (Homebrew GCC 9.3.0) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

/usr/local/bin/g++-9
g++-9 (Homebrew GCC 9.3.0) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

These versions are already installed on the macOS images that are used.

I think the closest I got was this version: https://github.com/mgeier/ssr/blob/4033b1ef2c85f5fbc8611568eecc33397a1ceada/.github/workflows/main.yml

These are the (failing) logs: https://github.com/mgeier/ssr/runs/1134236929

And most interestingly, this is the config.log: https://github.com/mgeier/ssr/suites/1212525346/artifacts/18049998

More specifically, this error appears when trying to link with -lvrpn:

Undefined symbols for architecture x86_64:
  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
      std::__1::vector<vrpn_Endpoint_IP*, std::__1::allocator<vrpn_Endpoint_IP*> >::__append(unsigned long) in libvrpn.a(vrpn_EndpointContainer.C.o)
      void std::__1::vector<vrpn_Endpoint_IP*, std::__1::allocator<vrpn_Endpoint_IP*> >::__push_back_slow_path<vrpn_Endpoint_IP* const>(vrpn_Endpoint_IP* const&) in libvrpn.a(vrpn_EndpointContainer.C.o)
ld: symbol(s) not found for architecture x86_64

To me, this looks like incompatible standard libraries between vrpn (which has been installed with brew) and GCC.

It would be great if you could make that work!

@HaHeho
Copy link
Contributor

HaHeho commented Sep 29, 2020

/usr/bin/gcc is not GCC. It's clang in disguise:

Apple clang version 12.0.0 (clang-1200.0.32.2)

All the tested Xcode versions actually call gcc and g++, which are in reality clang and clang.

Ah, I see. Isn't that the recommended way to build on macOS then and we should try to make that work (and not with GCC from another source?

These are the (failing) logs: https://github.com/mgeier/ssr/runs/1134236929

And most interestingly, this is the config.log: https://github.com/mgeier/ssr/suites/1212525346/artifacts/18049998

More specifically, this error appears when trying to link with -lvrpn:

Undefined symbols for architecture x86_64:
  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
      std::__1::vector<vrpn_Endpoint_IP*, std::__1::allocator<vrpn_Endpoint_IP*> >::__append(unsigned long) in libvrpn.a(vrpn_EndpointContainer.C.o)
      void std::__1::vector<vrpn_Endpoint_IP*, std::__1::allocator<vrpn_Endpoint_IP*> >::__push_back_slow_path<vrpn_Endpoint_IP* const>(vrpn_Endpoint_IP* const&) in libvrpn.a(vrpn_EndpointContainer.C.o)
ld: symbol(s) not found for architecture x86_64

To me, this looks like incompatible standard libraries between vrpn (which has been installed with brew) and GCC.

./configure seems already to be failing. Or does the error happen during compile?

I suppose it is worth a try to find a configuration for main.yml which utilizes the builtin clang and see if building with vrpn fails there as well. I mean this seems to have worked in my case without problems (clang 12 and vrpn via brew).

@mgeier
Copy link
Member Author

mgeier commented Sep 29, 2020

Isn't that the recommended way to build on macOS

I don't know. I guess so.

we should try to make that work

It does.

I just thought maybe somebody wants to use GCC for some reason, then we can show how that can be done.

But it's not important. As I wrote at the very top: "If not, it's not a problem, I guess most people use Xcode anyway."

./configure seems already to be failing.

Exactly. That's why I was talking about config.log, which contains the relevant error message.

Or does the error happen during compile?

Well, ./configure also does compile a few little test programs in order to check whether everything works as expected. And it also does some linking, which in case of linking to the vrpn library doesn't work, because it has been compiled with a different standard library.

I suppose it is worth a try to find a configuration for main.yml which utilizes the builtin clang and see if building with vrpn fails there as well.

There are several Xcode versions, all using clang, that are working fine (except some recent problems with Xcode 10.3, which are unrelated), no problems with vrpn:

- os: macos-latest
xcode: Xcode_12
env: {}
- os: macos-latest
xcode: Xcode_11.7
env: {}
- os: macos-latest
xcode: Xcode_11.4
env: {}
- os: macos-latest
xcode: Xcode_11.3.1
env:
LIBXML_CFLAGS: -I/Applications/Xcode_11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libxml2
- os: macos-latest
xcode: Xcode_10.3
env:
LIBXML_CFLAGS: -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2

I mean this seems to have worked in my case without problems (clang 12 and vrpn via brew).

Sure, clang is not the problem. The problem happens with GCC, which uses a different standard library.

@HaHeho
Copy link
Contributor

HaHeho commented Sep 30, 2020

Ah, I just realized that building with clang is what you term the Xcode way. I was confused by that, since the IDE is not involved.

I will try to replicate your approach of configuring and building with gcc-10 and see if the same error occurs (or if it can be fixed).

@HaHeho
Copy link
Contributor

HaHeho commented Oct 12, 2020

Modifying my given configuration in this way:

export CC="gcc-10"
export CXX="g++-10"
export CPATH="/usr/local/include"
export LIBRARY_PATH="/usr/local/lib"

I am able to pass ./configure with most desired extensions (VRPN was not recognized, so maybe that is also a sign for missing links). The build fails at (the part that is shown after calling make again):

$ make
Making all in src
/Library/Developer/CommandLineTools/usr/bin/make  all-am
/bin/sh ../libtool  --tag=CXX   --mode=link g++-10 -Wno-register -Wall -Wextra -pedantic -Wno-long-long -Winit-self -Wcast-align -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual -Wnon-virtual-dtor -Wwrite-strings -Wstrict-overflow=0 -I/usr/local/Cellar/libsndfile/1.0.30/include -I/usr/local/Cellar/flac/1.3.3/include -I/usr/local/Cellar/libvorbis/1.3.7/include -I/usr/local/Cellar/libogg/1.3.4/include -I/usr/local/Cellar/opus/1.3.1/include/opus -I/usr/local/Cellar/fftw/3.3.8_2/include  -I/usr/local/Cellar/libxml2/2.9.10_1/include/libxml2 -DQT_OPENGL_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_WIDGETS_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_GUI_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_CORE_LIB -F/usr/local/Cellar/qt/5.15.1/lib -I/usr/local/Cellar/qt/5.15.1/lib/QtOpenGL.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtCore.framework/Headers -fomit-frame-pointer -ffast-math -funroll-loops -march=k8 -msse -mfpmath=sse -msse2 -mfpmath=sse -DNDEBUG -g -std=c++17 -pthread -O3   -o ssr-binaural ssr_binaural.o configuration.o legacy_directionalpoint.o legacy_orientation.o legacy_position.o legacy_scene.o ssr_global.o xmlparser.o trackerintersense.o trackerpolhemus.o trackerrazor.o razor-ahrs/RazorAHRS.o  audioplayer.o audiorecorder.o legacy_network/commandparser.o legacy_network/connection.o legacy_network/networksubscriber.o legacy_network/server.o  fudi/server.o fudi/subscriber.o gui/qclicktextlabel.o gui/qcpulabel.o gui/qfilemenulabel.o gui/qgui.o gui/qguiframe.o gui/qopenglplotter.o gui/qscenebutton.o gui/qsourceproperties.o gui/qssrtimeline.o gui/qtimeedit.o gui/quserinterface.o gui/qvolumeslider.o gui/qzoomlabel.o gui/qclicktextlabel_moc.o gui/qcpulabel_moc.o gui/qfilemenulabel_moc.o gui/qgui_moc.o gui/qguiframe_moc.o gui/qopenglplotter_moc.o gui/qscenebutton_moc.o gui/qsourceproperties_moc.o gui/qssrtimeline_moc.o gui/qtimeedit_moc.o gui/quserinterface_moc.o gui/qvolumeslider_moc.o gui/qzoomlabel_moc.o  -lisense -lquat -lmysofa -lecasoundc  -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtOpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtWidgets -F/usr/local/Cellar/qt/5.15.1/lib -framework QtGui -F/usr/local/Cellar/qt/5.15.1/lib -framework QtCore -lfmt
libtool: link: g++-10 -Wno-register -Wall -Wextra -pedantic -Wno-long-long -Winit-self -Wcast-align -Wmissing-declarations -Wredundant-decls -Woverloaded-virtual -Wnon-virtual-dtor -Wwrite-strings -Wstrict-overflow=0 -I/usr/local/Cellar/libsndfile/1.0.30/include -I/usr/local/Cellar/flac/1.3.3/include -I/usr/local/Cellar/libvorbis/1.3.7/include -I/usr/local/Cellar/libogg/1.3.4/include -I/usr/local/Cellar/opus/1.3.1/include/opus -I/usr/local/Cellar/fftw/3.3.8_2/include -I/usr/local/Cellar/libxml2/2.9.10_1/include/libxml2 -DQT_OPENGL_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_WIDGETS_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_GUI_LIB -F/usr/local/Cellar/qt/5.15.1/lib -DQT_CORE_LIB -F/usr/local/Cellar/qt/5.15.1/lib -I/usr/local/Cellar/qt/5.15.1/lib/QtOpenGL.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.15.1/lib/QtCore.framework/Headers -fomit-frame-pointer -ffast-math -funroll-loops -march=k8 -msse -mfpmath=sse -msse2 -mfpmath=sse -DNDEBUG -g -std=c++17 -pthread -O3 -o ssr-binaural ssr_binaural.o configuration.o legacy_directionalpoint.o legacy_orientation.o legacy_position.o legacy_scene.o ssr_global.o xmlparser.o trackerintersense.o trackerpolhemus.o trackerrazor.o razor-ahrs/RazorAHRS.o audioplayer.o audiorecorder.o legacy_network/commandparser.o legacy_network/connection.o legacy_network/networksubscriber.o legacy_network/server.o fudi/server.o fudi/subscriber.o gui/qclicktextlabel.o gui/qcpulabel.o gui/qfilemenulabel.o gui/qgui.o gui/qguiframe.o gui/qopenglplotter.o gui/qscenebutton.o gui/qsourceproperties.o gui/qssrtimeline.o gui/qtimeedit.o gui/quserinterface.o gui/qvolumeslider.o gui/qzoomlabel.o gui/qclicktextlabel_moc.o gui/qcpulabel_moc.o gui/qfilemenulabel_moc.o gui/qgui_moc.o gui/qguiframe_moc.o gui/qopenglplotter_moc.o gui/qscenebutton_moc.o gui/qsourceproperties_moc.o gui/qssrtimeline_moc.o gui/qtimeedit_moc.o gui/quserinterface_moc.o gui/qvolumeslider_moc.o gui/qzoomlabel_moc.o -F/usr/local/Cellar/qt/5.15.1/lib -F/usr/local/Cellar/qt/5.15.1/lib -F/usr/local/Cellar/qt/5.15.1/lib -F/usr/local/Cellar/qt/5.15.1/lib -Wl,-bind_at_load  -lisense -lquat -lmysofa /usr/local/lib/libecasoundc.a -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -lfmt -pthread
Undefined symbols for architecture x86_64:
  "__ZN21ECA_CONTROL_INTERFACE7commandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
      __ZN11AudioPlayer9SoundfileD1Ev in audioplayer.o
      __ZN11AudioPlayer9Soundfile10get_formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERmS9_ in audioplayer.o
      __ZN11AudioPlayer9Soundfile21_get_jack_sample_rateEv in audioplayer.o
      __ZN11AudioPlayer9SoundfileC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbS8_ in audioplayer.o
      __ZN13AudioRecorderD1Ev in audiorecorder.o
      __ZN13AudioRecorder6enableEv in audiorecorder.o
      __ZN13AudioRecorder7disableEv in audiorecorder.o
      ...
  "__ZN3fmt2v76detail10vformat_toIcEENS0_20basic_format_contextISt20back_insert_iteratorINS1_6bufferIT_EEES6_E8iteratorERS7_NS0_17basic_string_viewIS6_EENS0_17basic_format_argsINS3_IS4_INS5_INS0_13type_identityIS6_E4typeEEEESH_EEEE", referenced from:
      __ZN3ssr4fudi10Subscriber11sample_rateEi in server.o
      __ZN3ssr4fudi10Subscriber15transport_frameEj in server.o
      __ZN3ssr4fudi10Subscriber8cpu_loadEf in server.o
      __ZN3ssr4fudi10Subscriber10processingEb in server.o
      __ZN3ssr4fudi10Subscriber17transport_rollingEb in server.o
      __ZThn72_N3ssr4fudi10Subscriber8cpu_loadEf in server.o
      __ZThn40_N3ssr4fudi10Subscriber15transport_frameEj in server.o
      ...
  "__ZNK21ECA_CONTROL_INTERFACE10last_errorB5cxx11Ev", referenced from:
      __ZN11AudioPlayer9Soundfile10get_formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERmS9_.cold in audioplayer.o
      __ZN11AudioPlayer9Soundfile21_get_jack_sample_rateEv.cold in audioplayer.o
      __ZN11AudioPlayer9SoundfileC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbS8_.cold in audioplayer.o
      __ZN13AudioRecorder6enableEv in audiorecorder.o
      __ZN13AudioRecorder7disableEv in audiorecorder.o
      __ZN13AudioRecorderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_S7_.cold in audiorecorder.o
  "__ZNK21ECA_CONTROL_INTERFACE11last_stringB5cxx11Ev", referenced from:
      __ZN11AudioPlayer9Soundfile10get_formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERmS9_ in audioplayer.o
      __ZN11AudioPlayer9Soundfile21_get_jack_sample_rateEv in audioplayer.o
  "__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
      __ZNK21ECA_CONTROL_INTERFACE16last_string_listEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
  "__ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv", referenced from:
      __ZNK21ECA_CONTROL_INTERFACE16last_string_listEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
      __ZNK21ECA_CONTROL_INTERFACE11last_stringEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
      __ZNK21ECA_CONTROL_INTERFACE10last_errorEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
      __ZNK21ECA_CONTROL_INTERFACE9last_typeEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
  "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc", referenced from:
      __ZN21ECA_CONTROL_INTERFACE13current_eventEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
  "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC1ERKS5_", referenced from:
      __ZNK21ECA_CONTROL_INTERFACE16last_string_listEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
  "__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_", referenced from:
      __ZNK21ECA_CONTROL_INTERFACE11last_stringEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
      __ZNK21ECA_CONTROL_INTERFACE10last_errorEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
      __ZNK21ECA_CONTROL_INTERFACE9last_typeEv in libecasoundc.a(libecasoundc_la-eca-control-interface.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [ssr-binaural] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

I have no idea what to take from the error. The link to ecasound is missing?

@mgeier
Copy link
Member Author

mgeier commented Oct 12, 2020

VRPN was not recognized

How was it not recognized?
In the same way I've described above?

The link to ecasound is missing?

Your command contains -lecasoundc, so this should be fine.
And since there is no error message about not finding the library libecasoundc, this means the library has actually been found.

The problem seems to be that some symbols (with the given mangling) don't seem to be in there.

Since those symbols seem to be related to std::string (see the basic_string part of the symbol), which is defined in the standard library, I guess this might be a similar problem as I've been describing above w.r.t. libvrpn (which was about std::vector).

My hypothesis is that your libecasoundc has been compiled with a different standard library than you are using to compile the SSR.

You could try to compile libecasoundc from source with GCC?

Same for libvrpn.

@HaHeho
Copy link
Contributor

HaHeho commented Oct 12, 2020

How was it not recognized?
In the same way I've described above?

The respective lines are:

config.log
configure:19281: checking various header files for VRPN tracker support
configure:19283: result: see below
configure:19285: checking vrpn_Tracker.h usability
configure:19285: g++-10 -c -g -std=c++17 -pthread -O3  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc conftest.cpp >&5
configure:19285: $? = 0
configure:19285: result: yes
configure:19285: checking vrpn_Tracker.h presence
configure:19285: g++-10 -E  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc conftest.cpp
configure:19285: $? = 0
configure:19285: result: yes
configure:19285: checking for vrpn_Tracker.h
configure:19285: result: yes
configure:19293: checking for library containing q_from_axis_angle
configure:19324: g++-10 -o conftest -g -std=c++17 -pthread -O3  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc  conftest.cpp -lmysofa -lecasoundc  -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtOpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtWidgets -F/usr/local/Cellar/qt/5.15.1/lib -framework QtGui -F/usr/local/Cellar/qt/5.15.1/lib -framework QtCore -lfmt >&5
Undefined symbols for architecture x86_64:
  "_q_from_axis_angle", referenced from:
      _main in ccUCzf4b.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
configure:19324: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SSR (SoundScape Renderer)"
| #define PACKAGE_TARNAME "ssr"
| #define PACKAGE_VERSION "0.5.0-147-g9e2b019"
| #define PACKAGE_STRING "SSR (SoundScape Renderer) 0.5.0-147-g9e2b019"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL "http://spatialaudio.net/ssr/"
| #define SSR_COPYRIGHT "Copyright © 2016 Division of Applied Acoustics, Chalmers University of Technology\nCopyright © 2014 Institut für Nachrichtentechnik, Universität Rostock\nCopyright © 2012 Quality & Usability Lab, Telekom Innovation Laboratories, TU Berlin\n\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
| #define SSR_AUTHORS "Written by:\n Matthias Geier, Jens Ahrens\nScientific supervision:\n Sascha Spors\nContributions by:\n Peter Bartz, Florian Hinterleitner, Torben Hohn,\n Christoph Hohnerlein, Christoph Hold, Lukas Kaser,\n André Möhl, Till Rettberg, David Runge, Fiete Winter\nGUI design:\n Katharina Bredies, Jonas Loh, Jens Ahrens\nLogo design:\n Fabian Hemmert"
| #define SSR_AUTHORS_QT "<EM>Written&nbsp;by:</EM><BR>&nbsp;Matthias&nbsp;Geier,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Scientific&nbsp;supervision:</EM><BR>&nbsp;Sascha&nbsp;Spors<BR><BR><EM>Contributions&nbsp;by:</EM><BR>&nbsp;Peter&nbsp;Bartz,&nbsp;Florian&nbsp;Hinterleitner,&nbsp;Torben&nbsp;Hohn,<BR>&nbsp;Christoph&nbsp;Hohnerlein,&nbsp;Christoph&nbsp;Hold,&nbsp;Lukas&nbsp;Kaser,<BR>&nbsp;Andr&eacute;&nbsp;M&ouml;hl,&nbsp;Till&nbsp;Rettberg,&nbsp;David&nbsp;Runge,&nbsp;Fiete&nbsp;Winter<BR><BR><EM>GUI&nbsp;design:</EM><BR>&nbsp;Katharina&nbsp;Bredies,&nbsp;Jonas&nbsp;Loh,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Logo&nbsp;design:</EM><BR>&nbsp;Fabian&nbsp;Hemmert"
| #define PACKAGE "ssr"
| #define VERSION "0.5.0-147-g9e2b019"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define ENABLE_ALL 1
| #define ENABLE_BINAURAL 1
| #define ENABLE_BRS 1
| #define ENABLE_WFS 1
| #define ENABLE_VBAP 1
| #define ENABLE_AAP 1
| #define ENABLE_GENERIC 1
| #define ENABLE_DCA 1
| #define ENABLE_OPTIMIZATION 1
| #define ENABLE_SSE 1
| #define ENABLE_SSE2 1
| #define ENABLE_GUI 1
| #define ENABLE_IP_INTERFACE 1
| #define ENABLE_WEBSOCKET_INTERFACE 1
| #define ENABLE_FUDI_INTERFACE 1
| #define ENABLE_ECASOUND 1
| #define ENABLE_SOFA 1
| #define ENABLE_POLHEMUS 1
| #define ENABLE_RAZOR 1
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char q_from_axis_angle ();
| int
| main ()
| {
| return q_from_axis_angle ();
|   ;
|   return 0;
| }
configure:19324: g++-10 -o conftest -g -std=c++17 -pthread -O3  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc  conftest.cpp -lquat  -lmysofa -lecasoundc  -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtOpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtWidgets -F/usr/local/Cellar/qt/5.15.1/lib -framework QtGui -F/usr/local/Cellar/qt/5.15.1/lib -framework QtCore -lfmt >&5
configure:19324: $? = 0
configure:19341: result: -lquat
configure:19351: checking for library containing vrpn_MAGIC
configure:19382: g++-10 -o conftest -g -std=c++17 -pthread -O3  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc  conftest.cpp -lquat -lmysofa -lecasoundc  -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtOpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtWidgets -F/usr/local/Cellar/qt/5.15.1/lib -framework QtGui -F/usr/local/Cellar/qt/5.15.1/lib -framework QtCore -lfmt >&5
Undefined symbols for architecture x86_64:
  "_vrpn_MAGIC", referenced from:
      _main in ccn1SGQ6.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
configure:19382: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SSR (SoundScape Renderer)"
| #define PACKAGE_TARNAME "ssr"
| #define PACKAGE_VERSION "0.5.0-147-g9e2b019"
| #define PACKAGE_STRING "SSR (SoundScape Renderer) 0.5.0-147-g9e2b019"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL "http://spatialaudio.net/ssr/"
| #define SSR_COPYRIGHT "Copyright © 2016 Division of Applied Acoustics, Chalmers University of Technology\nCopyright © 2014 Institut für Nachrichtentechnik, Universität Rostock\nCopyright © 2012 Quality & Usability Lab, Telekom Innovation Laboratories, TU Berlin\n\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
| #define SSR_AUTHORS "Written by:\n Matthias Geier, Jens Ahrens\nScientific supervision:\n Sascha Spors\nContributions by:\n Peter Bartz, Florian Hinterleitner, Torben Hohn,\n Christoph Hohnerlein, Christoph Hold, Lukas Kaser,\n André Möhl, Till Rettberg, David Runge, Fiete Winter\nGUI design:\n Katharina Bredies, Jonas Loh, Jens Ahrens\nLogo design:\n Fabian Hemmert"
| #define SSR_AUTHORS_QT "<EM>Written&nbsp;by:</EM><BR>&nbsp;Matthias&nbsp;Geier,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Scientific&nbsp;supervision:</EM><BR>&nbsp;Sascha&nbsp;Spors<BR><BR><EM>Contributions&nbsp;by:</EM><BR>&nbsp;Peter&nbsp;Bartz,&nbsp;Florian&nbsp;Hinterleitner,&nbsp;Torben&nbsp;Hohn,<BR>&nbsp;Christoph&nbsp;Hohnerlein,&nbsp;Christoph&nbsp;Hold,&nbsp;Lukas&nbsp;Kaser,<BR>&nbsp;Andr&eacute;&nbsp;M&ouml;hl,&nbsp;Till&nbsp;Rettberg,&nbsp;David&nbsp;Runge,&nbsp;Fiete&nbsp;Winter<BR><BR><EM>GUI&nbsp;design:</EM><BR>&nbsp;Katharina&nbsp;Bredies,&nbsp;Jonas&nbsp;Loh,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Logo&nbsp;design:</EM><BR>&nbsp;Fabian&nbsp;Hemmert"
| #define PACKAGE "ssr"
| #define VERSION "0.5.0-147-g9e2b019"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define ENABLE_ALL 1
| #define ENABLE_BINAURAL 1
| #define ENABLE_BRS 1
| #define ENABLE_WFS 1
| #define ENABLE_VBAP 1
| #define ENABLE_AAP 1
| #define ENABLE_GENERIC 1
| #define ENABLE_DCA 1
| #define ENABLE_OPTIMIZATION 1
| #define ENABLE_SSE 1
| #define ENABLE_SSE2 1
| #define ENABLE_GUI 1
| #define ENABLE_IP_INTERFACE 1
| #define ENABLE_WEBSOCKET_INTERFACE 1
| #define ENABLE_FUDI_INTERFACE 1
| #define ENABLE_ECASOUND 1
| #define ENABLE_SOFA 1
| #define ENABLE_POLHEMUS 1
| #define ENABLE_RAZOR 1
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char vrpn_MAGIC ();
| int
| main ()
| {
| return vrpn_MAGIC ();
|   ;
|   return 0;
| }
configure:19382: g++-10 -o conftest -g -std=c++17 -pthread -O3  -I/Users/helmholz/Documents/Code/SmartGit/ssr/gml/include -iframeworkOpenGL -DASIO_STANDALONE -DASIO_STANDALONE -I/Users/helmholz/Documents/Code/SmartGit/ssr/rapidjson/include -DASIO_STANDALONE -I/usr/local/include/libecasoundc  conftest.cpp -lvrpn  -lquat -lmysofa -lecasoundc  -L/usr/local/Cellar/libsndfile/1.0.30/lib -lsndfile -L/usr/local/Cellar/fftw/3.3.8_2/lib -lfftw3f -L/usr/local/lib -ljack -L/usr/local/Cellar/libxml2/2.9.10_1/lib -lxml2 -framework OpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtOpenGL -F/usr/local/Cellar/qt/5.15.1/lib -framework QtWidgets -F/usr/local/Cellar/qt/5.15.1/lib -framework QtGui -F/usr/local/Cellar/qt/5.15.1/lib -framework QtCore -lfmt >&5
Undefined symbols for architecture x86_64:
  "__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
      __ZNSt3__16vectorIP16vrpn_Endpoint_IPNS_9allocatorIS2_EEE8__appendEm in libvrpn.a(vrpn_EndpointContainer.C.o)
      __ZNSt3__16vectorIP16vrpn_Endpoint_IPNS_9allocatorIS2_EEE21__push_back_slow_pathIKS2_EEvRT_ in libvrpn.a(vrpn_EndpointContainer.C.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
configure:19382: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "SSR (SoundScape Renderer)"
| #define PACKAGE_TARNAME "ssr"
| #define PACKAGE_VERSION "0.5.0-147-g9e2b019"
| #define PACKAGE_STRING "SSR (SoundScape Renderer) 0.5.0-147-g9e2b019"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL "http://spatialaudio.net/ssr/"
| #define SSR_COPYRIGHT "Copyright © 2016 Division of Applied Acoustics, Chalmers University of Technology\nCopyright © 2014 Institut für Nachrichtentechnik, Universität Rostock\nCopyright © 2012 Quality & Usability Lab, Telekom Innovation Laboratories, TU Berlin\n\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
| #define SSR_AUTHORS "Written by:\n Matthias Geier, Jens Ahrens\nScientific supervision:\n Sascha Spors\nContributions by:\n Peter Bartz, Florian Hinterleitner, Torben Hohn,\n Christoph Hohnerlein, Christoph Hold, Lukas Kaser,\n André Möhl, Till Rettberg, David Runge, Fiete Winter\nGUI design:\n Katharina Bredies, Jonas Loh, Jens Ahrens\nLogo design:\n Fabian Hemmert"
| #define SSR_AUTHORS_QT "<EM>Written&nbsp;by:</EM><BR>&nbsp;Matthias&nbsp;Geier,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Scientific&nbsp;supervision:</EM><BR>&nbsp;Sascha&nbsp;Spors<BR><BR><EM>Contributions&nbsp;by:</EM><BR>&nbsp;Peter&nbsp;Bartz,&nbsp;Florian&nbsp;Hinterleitner,&nbsp;Torben&nbsp;Hohn,<BR>&nbsp;Christoph&nbsp;Hohnerlein,&nbsp;Christoph&nbsp;Hold,&nbsp;Lukas&nbsp;Kaser,<BR>&nbsp;Andr&eacute;&nbsp;M&ouml;hl,&nbsp;Till&nbsp;Rettberg,&nbsp;David&nbsp;Runge,&nbsp;Fiete&nbsp;Winter<BR><BR><EM>GUI&nbsp;design:</EM><BR>&nbsp;Katharina&nbsp;Bredies,&nbsp;Jonas&nbsp;Loh,&nbsp;Jens&nbsp;Ahrens<BR><BR><EM>Logo&nbsp;design:</EM><BR>&nbsp;Fabian&nbsp;Hemmert"
| #define PACKAGE "ssr"
| #define VERSION "0.5.0-147-g9e2b019"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define ENABLE_ALL 1
| #define ENABLE_BINAURAL 1
| #define ENABLE_BRS 1
| #define ENABLE_WFS 1
| #define ENABLE_VBAP 1
| #define ENABLE_AAP 1
| #define ENABLE_GENERIC 1
| #define ENABLE_DCA 1
| #define ENABLE_OPTIMIZATION 1
| #define ENABLE_SSE 1
| #define ENABLE_SSE2 1
| #define ENABLE_GUI 1
| #define ENABLE_IP_INTERFACE 1
| #define ENABLE_WEBSOCKET_INTERFACE 1
| #define ENABLE_FUDI_INTERFACE 1
| #define ENABLE_ECASOUND 1
| #define ENABLE_SOFA 1
| #define ENABLE_POLHEMUS 1
| #define ENABLE_RAZOR 1
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char vrpn_MAGIC ();
| int
| main ()
| {
| return vrpn_MAGIC ();
|   ;
|   return 0;
| }
configure:19399: result: no
configure:19409: checking VRPN tracker support
configure:19411: result: no
configure:19430: WARNING: --enable-vrpn (VRPN tracker support) requested but not available!

Actually I only noticed now that it fails in a similar fashion for vrpn as you experienced.

The problem seems to be that some symbols (with the given mangling) don't seem to be in there.

Since those symbols seem to be related to std::string (see the basic_string part of the symbol), which is defined in the standard library, I guess this might be a similar problem as I've been describing above w.r.t. libvrpn (which was about std::vector).

My hypothesis is that your libecasoundc has been compiled with a different standard library than you are using to compile the SSR.

Possible. ecasound I've actually built myself since the Homebrew version is pretty old. I've probably build with clang there as well.

You could try to compile libecasoundc from source with GCC?

I could try that if it helps to potentially solve this problem?

Same for libvrpn.

Not sure. I think I've tried to build vrpn on macOS before and never succeeded (do not remember what build system they use or if macOS is officially maintained). Therefore I was pleased to find it at Homebrew which also seems to harmonize with the SSR (when build with clang.

In any case, this seems like a lot of effort for an alternative build path, considering that the solution with Xcode is very straight forward. Would it even be possible (or reasonable) to recreate manual builds of potentially multiple dependencies in the CI? Do you think its still worth trying to make this path work or do we abbandon it as being too convoluted?

@umlaeute
Copy link
Contributor

umlaeute commented Oct 12, 2020

i don't have any opinion, but:

In any case, this seems like a lot of effort for an alternative build path, considering that the solution with Xcode is very straight forward.

well the problem is that if you were to include libssr in another project that also depends on a library that is compiled (or: can only be compiled) with g++, you are kind of lost.
otoh, since (iirc) there is no libssr, those chances are pretty slim. (but once there is a library version of SSR, you might re-consider the stance)

@mgeier
Copy link
Member Author

mgeier commented Oct 12, 2020

Thanks @umlaeute for your input!

[...] once there is a library version of SSR [...]

Well there kinda is a library version of the SSR, as each renderer can already be used as a library (as shown in the Pd external and MEX file). However, those are header-only libraries, so they will not be distributed in binary form, circumventing the whole problem.

We would probably have similar problems when distributing the SSR as Pd externals (which is a work in progress), but I guess in this case we would statically link all libraries, avoiding any compatibility problems. I haven't really looked into that yet, though.

@HaHeho

Just out of curiosity, I've tried to compile vrpn from source, but like you, I've encountered problems that I couldn't solve (for reference, this was the error: https://github.com/mgeier/ssr/actions/runs/302399514).

I've managed to build ecasoundc and it turns out that libfmt also has to be compiled from source: https://github.com/mgeier/ssr/actions/runs/302536840

Those two can be compiled like this:

git clone https://git.code.sf.net/p/ecasound/code ecasound
cd ecasound
./autogen-vc.sh
./configure
make
sudo make install
cd ..

git clone https://github.com/fmtlib/fmt.git
cd fmt
mkdir build
cd build
cmake ..
make
sudo make install
cd ..
cd ..

Would it even be possible (or reasonable) to recreate manual builds of potentially multiple dependencies in the CI?

It sure would be possible, we would just add several more if conditions and depending on the current matrix choose to either install stuff with brew or from source.

It would definitely be quite a bit more complicated, and the config file is already sufficiently complicated for my taste.

Do you think its still worth trying to make this path work or do we abbandon it as being too convoluted?

IMHO we can drop it for now.

If and when somebody needs it (for whatever reason), we can resume our efforts.

Thanks for working on this, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants