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

Remove useless dependencies #2749

Merged
merged 1 commit into from
May 1, 2016
Merged

Remove useless dependencies #2749

merged 1 commit into from
May 1, 2016

Conversation

jasp00
Copy link
Member

@jasp00 jasp00 commented Apr 30, 2016

Some objects depend on a library without using any of its symbols; this generates a useless dependency in packaged software. RemoteZynAddSubFx depended on libdl, libX11 and libXext. The vocoder LADSPA plugin depended on libfftw3f.

# vocoder_1337 does not use fftw3f
IF(NOT ("${_plugin}" STREQUAL "vocoder_1337"))
TARGET_LINK_LIBRARIES("${_plugin}" -lfftw3f)
ENDIF()
Copy link
Member

@tresf tresf Apr 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! We can merge this, but it also needs to make it to https://github.com/swh/ladspa. Many projects use Steve's upstream swh LADSPA packages and Steve's pretty good about merging in these types of PRs.

Edit: Upstream doesn't use vocoder yet and it doesn't utilize CMakeLists.txt, so this is ours only. 👍

@jasp00
Copy link
Member Author

jasp00 commented Apr 30, 2016

Builds are fixed.
Should I help bringing the vocoder into SWH?

@tresf
Copy link
Member

tresf commented Apr 30, 2016

@jasp00 sure if you think you can help. I ran out of time working on it, but the build/xml file I was working on is available here if you think it helps: https://github.com/tresf/ladspa/blob/vocoder/vocoder_1337.xml

P.S. Sorry for delay on merging these. The work you're doing is great and we desperately need the help, we're just very behind on things currently.

Off-topic to this particular PR but the cmake stuff specifically we don't have a bunch of people great at. (I'm pretty comfortable with writing cmake, but not as much with the linking and building portions as I'm not a C++ developer)

Anyway, we'll get to your PRs ASAP. Thanks again. 👍

@tresf
Copy link
Member

tresf commented May 1, 2016

👍

@tresf tresf merged commit 568a835 into LMMS:master May 1, 2016
@jasp00 jasp00 deleted the useless-deps branch May 1, 2016 20:18
@midi-pascal
Copy link
Contributor

@jasp00 @tresf The commit 60740fb breaks the build on my Ubuntu 14.04 x64 with this error:
[ 78%] Generating moc_ZynAddSubFx.cxx
Generating embedded_resources.h
Linking CXX executable ../RemoteZynAddSubFx
Scanning dependencies of target zynaddsubfx
[100%] Built target lmmsobjs
[100%] [100%] Building CXX object plugins/zynaddsubfx/CMakeFiles/zynaddsubfx.dir/ZynAddSubFx.cpp.o
Scanning dependencies of target lmms
Building CXX object plugins/zynaddsubfx/CMakeFiles/zynaddsubfx.dir/moc_ZynAddSubFx.cxx.o
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfltk.a(Fl_Double_Window.o): undefined reference to symbol 'XdbeAllocateBackBufferName'
//usr/lib/x86_64-linux-gnu/libXext.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/RemoteZynAddSubFx] Error 1
make[1]: *** [plugins/zynaddsubfx/CMakeFiles/RemoteZynAddSubFx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Building CXX object src/CMakeFiles/lmms.dir/lmms_automoc.cpp.o
Building CXX object src/CMakeFiles/lmms.dir/core/main.cpp.o
Linking CXX executable ../lmms
[100%] Built target lmms
Linking CXX shared module ../libzynaddsubfx.so
[100%] Built target zynaddsubfx
make: *** [all] Error 2

@jasp00
Copy link
Member Author

jasp00 commented May 3, 2016

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libfltk.a(Fl_Double_Window.o): undefined reference to symbol 'XdbeAllocateBackBufferName'

Your build is using the static library libfltk.a rather than the shared one libfltk.so. I see that the package in Ubuntu does not depend on libfltk1.3 (http://packages.ubuntu.com/trusty/lmms); this does not happen since wily.
What is the output of this command: fltk-config --use-images --ldflags ?

@midi-pascal
Copy link
Contributor

@jasp00
fltk-config --use-images --ldflags
-Wl,-Bsymbolic-functions -lfltk_images -lfltk -lX11

@midi-pascal
Copy link
Contributor

@jasp00 Your fix solves the problem 👍

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.

None yet

3 participants