-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make it workable on OpenBSD #2690
Conversation
devnexen
commented
Mar 19, 2016
- Additional LMMS_BUILD flag.
- Disallow on plugins -Wl,-no-undefined which triggers undefined references.
- Make sure X11 headers are found.
No objections here... I couldn't get a compile to fire due to such and old Command log for reference: #////// DEPS //////
su -
export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
# ^-- rit mirror, closest to me; placed in /root/.profile
pkg_add git cmake qt5 fftw3-float libogg libvorbis libsndfile libsamplerate jack sdl \
fluidsynth fltk gcc-4.9.3p0 g++-4.9.3p0
# ^-- couldn't find stk, but easy enough to dl/compile if needed
exit # or CTRL+D leave root
#////// BUILD //////
git clone -b master https://github.com/lmms/lmms
cd lmms; mkdir build target; cd build;
# gcc 4.9
cmake .. -DCMAKE_INSTALL_PREFIX=../target/ \
-DCMAKE_C_COMPILER=egcc \
-DCMAKE_CXX_COMPILER=eg++ \
-DWANT_QT5=True \
-DCMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake
# ^-- pkgconfig couldn't find qt5, hence prefix
# -- OR --
# clang
cmake .. -DCMAKE_INSTALL_PREFIX=../target/ \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DWANT_QT5=True \
-DCMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake |
There is either clang or gcc 4.9 (in this case compilers are egcc and eg++) port/package. |
As from kind @tresf request, and he mentioned the base compiler is far too old to compile even c++0x code ; hence this is how to test properly on OpenBSD (tested with the current stable), here is a little update of his command log reference
Hope it is useful. |
@devnexen Much obliged. I'll try those this evening (western hemisphere) and post back. 👍 |
ADD_DEFINITIONS(-DOS_LINUX) | ||
ELSE(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE) | ||
ELSE(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not incorrect, but this can be simplified to ELSE()
, ENDIF()
, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct with older version of cmake ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct with older version of cmake ?
Yes, this is a readability practice. e.g. if you have many nested IF()
's.
IF(FOO)
MESSAGE("IN FOO")
IF(BAR)
MESSAGE("IN BAR")
ENDIF(FOO)
ENDIF(BAR)
It's fine to leave, but we've been slowly cleaning them up in many places as we visit them as they start to loose their effectiveness when there are too many params.
IF(FOO OR BAR OR LOREM OR IPSUM OR DOLOR OR SIT OR AMET)
MESSAGE("HELLO FOO BAR LOREM IPSUM DOLOR SIT AMET")
ENDIF(FOO OR BAR OR LOREM OR IPSUM OR DOLOR OR SIT OR AMET)
vs.
IF(FOO OR BAR OR LOREM OR IPSUM OR DOLOR OR SIT OR AMET)
MESSAGE("HELLO FOO BAR LOREM IPSUM DOLOR SIT AMET")
ENDIF()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair point. updating.
No major issues with the PR. Nice work. I've left a few comments where we could do things slightly better. Feedback welcome. Test results with GCC 4.9 pass. I've updated my snippet above to reflect your suggestions. Next is clang... From your dragon avatar, I can only assume that's your compiler of choice? :) |
Ok, so clang is a bit shotty at the moment... Without
With
That's as far as I got. If you're ok leaving out support for clang for now, so are we. 👍 |
Hi and thanks for the feedback. I admit for clang I tested with OpenBSD current which is clang 3.8, I think with OpenBSD 5.8 it is 3.5 so we can leave it for the moment. |
@@ -3,12 +3,12 @@ INCLUDE(BuildPlugin) | |||
|
|||
# definitions for ZynAddSubFX | |||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD) | |||
FIND_PACKAGE(X11) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting looks slightly off here.
@devnexen thanks again for this. If you could touch up the formatting and squash your commits e.g. |
- Additional LMMS_BUILD flag. - Disallow on plugins -Wl,-no-undefined which triggers undefined references. - Make sure X11 headers are found. Lib ossaudio is needed only for OpenBSD redundant expression removal simplify condition for detection OS 'kind' seems the last commit brought an issue on OSx travis test ....
Ok thanks for your patience :) |