{"action":"created","issue":{"url":"https://api.github.com/repos/LMMS/lmms/issues/4156","repository_url":"https://api.github.com/repos/LMMS/lmms","labels_url":"https://api.github.com/repos/LMMS/lmms/issues/4156/labels{/name}","comments_url":"https://api.github.com/repos/LMMS/lmms/issues/4156/comments","events_url":"https://api.github.com/repos/LMMS/lmms/issues/4156/events","html_url":"https://github.com/LMMS/lmms/issues/4156","id":294525430,"number":4156,"title":"Build failure when linking carlabase.so: undefined references ","user":{"login":"GvMariani","id":1090188,"avatar_url":"https://avatars0.githubusercontent.com/u/1090188?v=4","gravatar_id":"","url":"https://api.github.com/users/GvMariani","html_url":"https://github.com/GvMariani","followers_url":"https://api.github.com/users/GvMariani/followers","following_url":"https://api.github.com/users/GvMariani/following{/other_user}","gists_url":"https://api.github.com/users/GvMariani/gists{/gist_id}","starred_url":"https://api.github.com/users/GvMariani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GvMariani/subscriptions","organizations_url":"https://api.github.com/users/GvMariani/orgs","repos_url":"https://api.github.com/users/GvMariani/repos","events_url":"https://api.github.com/users/GvMariani/events{/privacy}","received_events_url":"https://api.github.com/users/GvMariani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-05T20:07:36Z","updated_at":"2018-02-05T20:42:27Z","closed_at":null,"author_association":"NONE","body":"Still preparing a package of lmms 1.2.0 RC5 for Rosa Linux Fresh R10 (a Mandriva derivative) on x86_64: until a few days ago Rosa did not provide a package for Carla and libsoundio, hence their support was disabled in the cmake command line...\r\nNow I managed to make a package for both things and tried to enable the support for Carla and libsoundio... hitting another (little) roadblock, as shown in the log snippet below:\r\n***************************************\r\n```\r\n[ 26%] Linking CXX shared library ../libcarlabase.so\r\ncd /tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/build/plugins/carlabase && /usr/bin/cmake -E cmake_link_script CMakeFiles/carlabase.dir/link.txt --verbose=1\r\n/usr/bin/c++  -fPIC -fno-exceptions -Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow -Wno-array-bounds -O2 -Wa,--compress-debug-sections -gdwarf-4 -fvar-tracking-assignments -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -ffat-lto-objects -fno-delete-null-pointer-checks -fstack-protector --param=ssp-buffer-size=4 -fPIC -fPIC -DPIC -DNDEBUG -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -Wl,--hash-style=gnu -shared -Wl,-soname,libcarlabase.so -o ../libcarlabase.so CMakeFiles/carlabase.dir/carla.cpp.o CMakeFiles/carlabase.dir/moc_carla.cpp.o  -L/usr/lib64/carla -Wl,-rpath,/usr/lib64/carla -lcarla_standalone2 /usr/lib64/libQt5Widgets.so.5.9.4 /usr/lib64/libQt5Xml.so.5.9.4 /usr/lib64/libQt5Gui.so.5.9.4 /usr/lib64/libQt5Core.so.5.9.4 \r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::CarlaInstrument(InstrumentTrack*, Plugin::Descriptor const*, bool)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:148: undefined reference to `Instrument::Instrument(InstrumentTrack*, Plugin::Descriptor const*)'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:192: undefined reference to `InstrumentPlayHandle::InstrumentPlayHandle(Instrument*, InstrumentTrack*)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `LmmsCore::mixer()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Engine.h:66: undefined reference to `LmmsCore::s_mixer'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::CarlaInstrument(InstrumentTrack*, Plugin::Descriptor const*, bool)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:193: undefined reference to `Mixer::addPlayHandle(PlayHandle*)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::~CarlaInstrument()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:200: undefined reference to `LmmsCore::s_mixer'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:200: undefined reference to `Mixer::removePlayHandlesOfTypes(Track*, unsigned char)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::handleGetBufferSize() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:229: undefined reference to `LmmsCore::s_mixer'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `LmmsCore::mixer()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Engine.h:66: undefined reference to `LmmsCore::s_mixer'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::handleGetSampleRate() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:235: undefined reference to `Mixer::processingSampleRate() const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::play(float (*) [2])':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:324: undefined reference to `LmmsCore::s_mixer'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `LmmsCore::getSong()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Engine.h:76: undefined reference to `LmmsCore::s_song'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::play(float (*) [2])':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:338: undefined reference to `LmmsCore::s_framesPerTick'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:338: undefined reference to `MidiTime::frames(float) const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `Song::currentTact() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:325: undefined reference to `MidiTime::getTact() const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `Song::getBeat() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:126: undefined reference to `TimeSig::TimeSig(MeterModel const&)'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:126: undefined reference to `MidiTime::getBeatWithinBar(TimeSig const&) const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `Song::getBeatTicks() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:131: undefined reference to `TimeSig::TimeSig(MeterModel const&)'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:131: undefined reference to `MidiTime::getTickWithinBeat(TimeSig const&) const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `Song::currentTact() const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Song.h:325: undefined reference to `MidiTime::getTact() const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::play(float (*) [2])':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:347: undefined reference to `Song::getTempo()'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:367: undefined reference to `InstrumentTrack::processAudioBuffer(float (*) [2], short, NotePlayHandle*)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `int AutomatableModel::value<int>(int) const':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/AutomatableModel.h:137: undefined reference to `AutomatableModel::controllerValue(int) const'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/AutomatableModel.h:137: undefined reference to `AutomatableModel::controllerValue(int) const'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/AutomatableModel.h:137: undefined reference to `AutomatableModel::controllerValue(int) const'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::play(float (*) [2])':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:331: undefined reference to `InstrumentTrack::processAudioBuffer(float (*) [2], short, NotePlayHandle*)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrumentView::CarlaInstrumentView(CarlaInstrument*, QWidget*)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:476: undefined reference to `InstrumentView::InstrumentView(Instrument*, QWidget*)'\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:491: undefined reference to `embed::getIconPixmap(char const*, int, int)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrument::~CarlaInstrument()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:198: undefined reference to `Instrument::~Instrument()'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `Instrument::operator delete(void*)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/include/Instrument.h:46: undefined reference to `MemoryManager::free(void*)'\r\nCMakeFiles/carlabase.dir/carla.cpp.o: In function `CarlaInstrumentView::~CarlaInstrumentView()':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/plugins/carlabase/carla.cpp:504: undefined reference to `InstrumentView::~InstrumentView()'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o: In function `CarlaInstrument::qt_metacall(QMetaObject::Call, int, void**)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/build/plugins/carlabase/moc_carla.cpp:116: undefined reference to `Plugin::qt_metacall(QMetaObject::Call, int, void**)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o: In function `CarlaInstrument::qt_metacast(char const*)':\r\n/tmp/abf/rpmbuild/BUILD/lmms-1.2.0-rc5/build/plugins/carlabase/moc_carla.cpp:111: undefined reference to `Plugin::qt_metacast(char const*)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTI15CarlaInstrument[_ZTI15CarlaInstrument]+0x10): undefined reference to `typeinfo for Instrument'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTI19CarlaInstrumentView[_ZTI19CarlaInstrumentView]+0x10): undefined reference to `typeinfo for InstrumentView'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0x80): undefined reference to `Instrument::fullDisplayName() const'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0x88): undefined reference to `Plugin::loadFile(QString const&)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0x90): undefined reference to `Plugin::childModel(QString const&)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0xb0): undefined reference to `Instrument::deleteNotePluginData(NotePlayHandle*)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0xb8): undefined reference to `Instrument::beatLen(NotePlayHandle*) const'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0xd8): undefined reference to `Instrument::isFromTrack(Track const*) const'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0x118): undefined reference to `JournallingObject::saveState(QDomDocument&, QDomElement&)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV15CarlaInstrument[_ZTV15CarlaInstrument]+0x120): undefined reference to `JournallingObject::restoreState(QDomElement const&)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV19CarlaInstrumentView[_ZTV19CarlaInstrumentView]+0x1b0): undefined reference to `InstrumentView::setModel(Model*, bool)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV19CarlaInstrumentView[_ZTV19CarlaInstrumentView]+0x230): undefined reference to `non-virtual thunk to InstrumentView::setModel(Model*, bool)'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro._ZTV19CarlaInstrumentView[_ZTV19CarlaInstrumentView]+0x240): undefined reference to `ModelView::doConnections()'\r\nCMakeFiles/carlabase.dir/moc_carla.cpp.o:(.data.rel.ro+0x40): undefined reference to `Plugin::staticMetaObject'\r\ncollect2: error: ld returned 1 exit status\r\nmake[2]: *** [plugins/carlabase/CMakeFiles/carlabase.dir/build.make:137: plugins/libcarlabase.so] Error 1\r\n```\r\n**************************************\r\nAttached a full log of a failed build.\r\n[BuildFailed.txt](https://github.com/LMMS/lmms/files/1696605/BuildFailed.txt)\r\n\r\nSome of the missing symbols are from src/core and, from what I can see by inspecting the build directory, this part of the sources are still to be built when make tries to link carlabase.so: than all could be needed to fix this, is to change the build order of the various subdirs.\r\nHowever, while all the involved references are internal to the lmms sources, this means that carlabase is actually under-linked. I can workaround the issue by forcing our build system to pass only \"-Wl,--as-needed\" to the linker (instead of the default \"-Wl,--as-needed -Wl,--no-undefined\"): this fixes the build, but obviously produces a carlabase.so with the same undefined symbols as above.\r\nPerhaps this situation is safe, because all the needed symbols are provided by other lmms internal modules and consequently they are always present, ruling out the chance of any runtime error because of missing symbols; but I would argue that it is better to have a properly linked program, if this is doable..."},"comment":{"url":"https://api.github.com/repos/LMMS/lmms/issues/comments/363214896","html_url":"https://github.com/LMMS/lmms/issues/4156#issuecomment-363214896","issue_url":"https://api.github.com/repos/LMMS/lmms/issues/4156","id":363214896,"user":{"login":"tresf","id":6345473,"avatar_url":"https://avatars0.githubusercontent.com/u/6345473?v=4","gravatar_id":"","url":"https://api.github.com/users/tresf","html_url":"https://github.com/tresf","followers_url":"https://api.github.com/users/tresf/followers","following_url":"https://api.github.com/users/tresf/following{/other_user}","gists_url":"https://api.github.com/users/tresf/gists{/gist_id}","starred_url":"https://api.github.com/users/tresf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tresf/subscriptions","organizations_url":"https://api.github.com/users/tresf/orgs","repos_url":"https://api.github.com/users/tresf/repos","events_url":"https://api.github.com/users/tresf/events{/privacy}","received_events_url":"https://api.github.com/users/tresf/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T20:42:27Z","updated_at":"2018-02-05T20:42:27Z","author_association":"OWNER","body":"Thanks for the detailed write up.\r\n\r\nThis doesn't seem much different than how we do it on Ubuntu.  Tagging @falkTX for some insight.  From what I've seen, Carla is build the same as the rest of our plugins, I'm not sure what's different about it that would single it out on Mandriva and friends."}}
{"actor":{"display_login":"tresf"}}