Anonymous | Login | Signup for a new account | 2024-03-29 08:25 UTC |
My View | View Issues | Change Log | Roadmap | Doomseeker Issue Support Ranking | Rules | My Account |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0003496 | Doomseeker | [All Projects] Documentation | public | 2018-09-18 21:00 | 2022-08-25 10:22 | ||||||||
Reporter | WubTheCaptain | ||||||||||||
Assigned To | |||||||||||||
Priority | low | Severity | feature | Reproducibility | N/A | ||||||||
Status | confirmed | Resolution | open | ||||||||||
Platform | amd64 | OS | OpenBSD | OS Version | 6.4-current | ||||||||
Product Version | 1.1 | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0003496: Document instructions to build Doomseeker on OpenBSD | ||||||||||||
Description | I thought building Doomseeker from source on OpenBSD would be easy after installing qt5 port and whatnot, but nope. There's no documentation specific for OpenBSD in Doomseeker's source distribution, with relevant other frustrations and takes way longer than I'd like to figure out to a mildly professional OpenBSD user like me (or in other words, building Doomseeker is easier on GNU/Linux). The frustrations include system bzlib.h error, bad Qt5 detection and so on, probably to be solved in other tickets. (Tested with Doomseeker 1.2~beta.) | ||||||||||||
Additional Information | Quote from pkg_info qt4People who want to use qt4 to compile applications outside the ports tree should note that qt4's installation conforms to OpenBSD habits, not TrollTech's recommendations. Accordingly: - libs are separated from includes. - moc is installed as /usr/local/bin/moc4, in order not to conflict with other qt versions. - uic is installed as /usr/local/bin/uic4 Generally, it's just a question of invoking env MOC=moc4 UIC=uic4 configure --with-qt-includes=/usr/local/include/X11/qt4 --with-qt-libraries=/usr/local/lib/qt4 Or to force MOC/UIC in your make/gmake invocation: make MOC=moc4 UIC=uic4 will override the Makefile contents. Warning: the qt4 library also appears under /usr/local/lib, but you *must* make sure your application sees /usr/local/lib/qt4 *first*, because /usr/local/lib may also contain a later incarnation of Qt, in which case the linker will pick up the most recent library. Quote from pkg_info qt5People who want to use Qt5 to compile applications outside the ports tree should note that Qt5's installation conforms to OpenBSD habits, not TrollTech's recommendations. Accordingly: - libs are separated from includes. - moc is installed as /usr/local/bin/moc-qt5, in order not to conflict with other Qt versions. - uic is installed as /usr/local/bin/uic-qt5 Generally, it's just a question of invoking: env MOC=moc-qt5 UIC=uic-qt5 configure \ --with-qt-includes=/usr/local/include/X11/qt5 \ --with-qt-libraries=/usr/local/lib/qt5 ... or, to force MOC/UIC in your make/gmake invocation: make MOC=moc-qt5 UIC=uic-qt5 will override the Makefile contents. | ||||||||||||
Attached Files | 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch [^] (2,684 bytes) 2018-10-06 20:08 [Show Content]
0001-COMPILE.txt-Document-OpenBSD-build-instructions.v2.patch [^] (2,743 bytes) 2018-10-06 20:42 [Show Content] 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v3.patch [^] (2,847 bytes) 2018-10-07 10:03 [Show Content] 0002-CHANGELOG.md-Add-Added-OpenBSD-documentation.patch [^] (861 bytes) 2018-10-07 10:33 [Show Content] | ||||||||||||
Notes | |
(0019554) WubTheCaptain (reporter) 2018-09-19 11:06 |
intox8907 reported these steps to compile on OpenBSD in ticket 0003494:export Qt5Widgets_DIR=/usr/local/lib/qt5/cmake/Qt5Widgets/ export Qt5LinguistTools_DIR=/usr/local/lib/qt5/cmake/Qt5LinguistTools/ export Qt5Multimedia_DIR=/usr/local/lib/qt5/cmake/Qt5Multimedia export Qt5Xml_DIR=/usr/local/lib/qt5/cmake/Qt5Xml export CPATH=$CPATH:/usr/local/include cmake .. make It should also be tested if compiling with gcc 4.2.1 in OpenBSD 6.3 -stable works or not. (I would guess it won't work.) |
(0019574) WubTheCaptain (reporter) 2018-09-19 17:46 |
Quote from WubTheCaptain CXX=g++ (4.2.1) is not supported by cmake 3.10 in OpenBSD 6.4-current, so I guess not. Gladly there's clang++ for that at least, and gcc 4.9.4 in ports for OpenBSD 6.3. gcc 4.2.1 works for C source files in Doomseeker (which there aren't many anyway). |
(0019682) WubTheCaptain (reporter) 2018-09-23 00:55 |
Since 0003495 was resolved, the steps to build on OpenBSD are much more simplified:export Qt5_DIR=/usr/local/lib/qt5/cmake/Qt5 cmake -DCMAKE_CXX_FLAGS='-I/usr/local/include' $DOOMSEEKER_SRC make CMAKE_CXX_FLAGS include path need to be passed for bzlib.h. No idea if -O2 is also required or not. (I actually came across the solution from'https://github.com/citra-emu/citra/wiki/Building-for-OpenBSD [^]' , thanks!) |
(0019963) WubTheCaptain (reporter) 2018-10-06 20:12 |
Patch by me attached. I agree to the GNU All-Permissive license at the footer of the file, although if may I'll just dedicate this to public domain with no warranties (CC0 1.0 Universal (CC0 1.0) Public Domain Dedication) because I "don't" have a legal name I'd like to use for the contribution. Includes a foreword warning about issue 0003494; please make a comment there about this COMPILE.txt blurb if merged. |
(0019964) WubTheCaptain (reporter) 2018-10-06 20:22 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch+OpenBSD's base operating system comes with zlib and libbz2. Install the +required ports: "Install the required ports:" → "Install the required ports, depending on your OpenBSD operating system version:" ? |
(0019965) WubTheCaptain (reporter) 2018-10-06 20:23 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch-Supported compilers are GCC and, on Windows, MSVC. For compiling on +Supported compilers are GCC, clang and, on Windows, MSVC. For compiling on This pushes the line length past 72 characters width limit (which I enforced for my text in the OpenBSD section), but the paragraph below and above are all over the place anyway... |
(0019966) WubTheCaptain (reporter) 2018-10-06 20:25 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patchAdd Clang to list of supported compilers. This is a prerequisite, since it's the default C/C++ compiler since OpenBSD 6.4 I believe. s/since/because/ on first occurence (with 72 line width), probably. |
(0019967) WubTheCaptain (reporter) 2018-10-06 20:29 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch+not Trolltech or Qt Project/The Qt Company's recommendations. Setting Qt5_DIR +is necessary for CMake to know to look for it. Qt5_DIR → `Qt5_DIR` Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch bzlib.h → `bzlib.h` |
(0019968) WubTheCaptain (reporter) 2018-10-06 20:43 |
New v2 patch attached with fixes mentioned in previous notes. |
(0019969) WubTheCaptain (reporter) 2018-10-06 21:00 |
Sigh, let me test GCC 4.2.1 again tomorrow before merging this. |
(0019978) WubTheCaptain (reporter) 2018-10-07 07:54 edited on: 2018-10-07 09:48 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v2.patch+Doomseeker has been tested on OpenBSD 6.4-current with both GCC 4.2.1 and Clang +6.0.0 toolchains, as of October 2018. GCC 4.2.1 → g++ 4.9.4. Mention incompatibility with g++ 4.2.1 in base. g++ 4.2.1 is unsupported by CMake (cxx_decltype error). GCC 4.2.1 is fine for $CC, for what little C language code there is. g++ 4.9.4 from snapshot ports (OpenBSD 6.4) works with CMake without CMAKE_CXX_FLAGS, this will be installed at `/usr/local/bin/eg++`. clang in OpenBSD base (since OpenBSD 6.1 on arm64, since OpenBSD 6.3 on armv6 and sparc64) and works out of the box without additional ports. Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v2.patch+ pkg_add qtbase cmake # OpenBSD >= 6.2, latest Qt version (Qt5) qtbase doesn't uninstall the required libraries. Remove this line. |
(0019979) WubTheCaptain (reporter) 2018-10-07 08:04 edited on: 2018-10-07 09:49 |
clang became the default compiler on amd64 and i386 on OpenBSD 6.2, although this was not mentioned in the OpenBSD 6.2 release announcement. Oh, and I got a runtime error from that g++ 4.9.4 build of Doomseeker. I'm investigating it... perhaps we only support OpenBSD >= 6.1/6.2, nonetheless only the latest two -stable releases are officially supported. |
(0019980) WubTheCaptain (reporter) 2018-10-07 08:26 |
Quote from 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v2.patch+ cmake \ + -DCMAKE_CXX_FLAGS="-I /usr/local/include" \ + .. Probably should not override `CXXFLAGS` (or `CPPFLAGS`), but amend them. Either pass `CXXFLAGS` or `CPPFLAGS` before calling `cmake`, or use `cmake -E`. |
(0019981) WubTheCaptain (reporter) 2018-10-07 08:28 edited on: 2018-10-07 08:29 |
Quote from WubTheCaptain Documented in CMake's documentation: cmake-compile-features(7) § Supported Compilers. Quote from cmake-compile-features(7) § Supported Compilers (C++) |
(0019986) WubTheCaptain (reporter) 2018-10-07 10:05 |
Patch v3 attached. Rebase to tip if necessary. We could do our CXXFLAGS thing in CMake build files, but I've decided against it for now. |
(0019987) WubTheCaptain (reporter) 2018-10-07 10:24 edited on: 2018-10-07 10:25 |
Question: Although I already put this up for review, should I use CPATH instead of CXXFLAGS? CPATH can be exported to the environment, which the GNU C Preprocessor (and Clang) looks for after any paths given with -I option. I don't know what CMake does with this. CXXFLAGS gets added to CMAKE_CXX_FLAGS on initial configuration and cached to CMakeCache.txt (or something), and then ignored afterwards. If you messed up the initial configuration, you need to start over. On the flip side, you don't need to type CXXFLAGS again or export it to your environment; it stays in the directory. |
(0019988) WubTheCaptain (reporter) 2018-10-07 10:27 |
Fyi, bsd.port.mk(5) doesn't support CPATH but supports CXXFLAGS anyway. |
(0020000) Blzut3 (administrator) 2018-10-08 05:37 |
Should be possible to set BZIP2_INCLUDE_DIR to /usr/local/include. Also with the Qt5_DIR variable, I believe you can use -DQt5_DIR= on the CMake command line. Actually kind of surprised that CMake checks for environment variables for those. |
(0020010) WubTheCaptain (reporter) 2018-10-08 11:01 edited on: 2018-10-08 11:01 |
Quote from Blzut3 No, it's not possible. Not -DBZIP2_INCLUDE_DIR=/usr/local/include nor environment variable before calling CMake. bzlib.h won't be found. Quote from Blzut3 This is possible. What do you suggest? |
(0020134) Blzut3 (administrator) 2018-10-18 00:47 |
For BZip2, CMake has a ton of ways to specify search paths documented in find_path:'https://cmake.org/cmake/help/latest/command/find_path.html [^]' I would probably suggest looking at BZip2_ROOT (https://cmake.org/cmake/help/latest/variable/PackageName_ROOT.html#variable:%3CPackageName%3E_ROOT) and failing that CMAKE_FIND_ROOT_PATH. I would say I prefer -D over environment variables since environment variables feel too much like globals to me and I feel better minimizing them. |
Only registered users can voice their support. Click here to register, or here to log in. | |
Supporters: | No one explicitly supports this issue yet. |
Opponents: | WubTheCaptain |
Issue History | |||
Date Modified | Username | Field | Change |
2018-09-18 21:00 | WubTheCaptain | New Issue | |
2018-09-18 21:07 | WubTheCaptain | Additional Information Updated | View Revisions |
2018-09-18 21:07 | WubTheCaptain | Additional Information Updated | View Revisions |
2018-09-18 21:27 | WubTheCaptain | Note Added: 0019547 | |
2018-09-18 21:27 | WubTheCaptain | Note Edited: 0019547 | View Revisions |
2018-09-19 11:06 | WubTheCaptain | Note Added: 0019554 | |
2018-09-19 15:25 | WubTheCaptain | Note Deleted: 0019547 | |
2018-09-19 17:36 | WubTheCaptain | Relationship added | child of 0003499 |
2018-09-19 17:46 | WubTheCaptain | Note Added: 0019574 | |
2018-09-23 00:55 | WubTheCaptain | Note Added: 0019682 | |
2018-09-23 00:55 | WubTheCaptain | Status | new => acknowledged |
2018-09-24 19:37 | WubTheCaptain | Relationship replaced | related to 0003499 |
2018-09-24 20:16 | WubTheCaptain | Note Added: 0019714 | |
2018-09-24 20:17 | WubTheCaptain | Note Edited: 0019714 | View Revisions |
2018-09-24 20:17 | WubTheCaptain | Note Deleted: 0019714 | |
2018-10-06 18:56 | WubTheCaptain | Assigned To | => WubTheCaptain |
2018-10-06 18:56 | WubTheCaptain | Status | acknowledged => assigned |
2018-10-06 18:56 | WubTheCaptain | Target Version | => 1.2 |
2018-10-06 20:08 | WubTheCaptain | File Added: 0001-COMPILE.txt-Document-OpenBSD-build-instructions.patch | |
2018-10-06 20:12 | WubTheCaptain | Note Added: 0019963 | |
2018-10-06 20:12 | WubTheCaptain | Status | assigned => needs review |
2018-10-06 20:22 | WubTheCaptain | Note Added: 0019964 | |
2018-10-06 20:23 | WubTheCaptain | Note Added: 0019965 | |
2018-10-06 20:25 | WubTheCaptain | Note Added: 0019966 | |
2018-10-06 20:29 | WubTheCaptain | Note Added: 0019967 | |
2018-10-06 20:30 | WubTheCaptain | Status | needs review => assigned |
2018-10-06 20:42 | WubTheCaptain | File Added: 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v2.patch | |
2018-10-06 20:43 | WubTheCaptain | Note Added: 0019968 | |
2018-10-06 20:43 | WubTheCaptain | Status | assigned => needs review |
2018-10-06 21:00 | WubTheCaptain | Note Added: 0019969 | |
2018-10-06 21:00 | WubTheCaptain | Status | needs review => assigned |
2018-10-07 07:54 | WubTheCaptain | Note Added: 0019978 | |
2018-10-07 08:04 | WubTheCaptain | Note Added: 0019979 | |
2018-10-07 08:26 | WubTheCaptain | Note Added: 0019980 | |
2018-10-07 08:28 | WubTheCaptain | Note Added: 0019981 | |
2018-10-07 08:29 | WubTheCaptain | Note Edited: 0019981 | View Revisions |
2018-10-07 09:48 | WubTheCaptain | Note Edited: 0019978 | View Revisions |
2018-10-07 09:49 | WubTheCaptain | Note Edited: 0019979 | View Revisions |
2018-10-07 10:03 | WubTheCaptain | File Added: 0001-COMPILE.txt-Document-OpenBSD-build-instructions.v3.patch | |
2018-10-07 10:03 | WubTheCaptain | Status | assigned => needs review |
2018-10-07 10:05 | WubTheCaptain | Note Added: 0019986 | |
2018-10-07 10:24 | WubTheCaptain | Note Added: 0019987 | |
2018-10-07 10:25 | WubTheCaptain | Note Edited: 0019987 | View Revisions |
2018-10-07 10:27 | WubTheCaptain | Note Added: 0019988 | |
2018-10-07 10:33 | WubTheCaptain | File Added: 0002-CHANGELOG.md-Add-Added-OpenBSD-documentation.patch | |
2018-10-08 05:37 | Blzut3 | Note Added: 0020000 | |
2018-10-08 08:10 | WubTheCaptain | Priority | normal => low |
2018-10-08 08:10 | WubTheCaptain | Status | needs review => assigned |
2018-10-08 08:19 | WubTheCaptain | Priority | low => normal |
2018-10-08 11:01 | WubTheCaptain | Note Added: 0020010 | |
2018-10-08 11:01 | WubTheCaptain | Status | assigned => needs review |
2018-10-08 11:01 | WubTheCaptain | Note Edited: 0020010 | View Revisions |
2018-10-18 00:47 | Blzut3 | Note Added: 0020134 | |
2018-10-18 00:59 | WubTheCaptain | Status | needs review => assigned |
2018-10-18 01:01 | WubTheCaptain | Target Version | 1.2 => 1.3 |
2018-12-17 05:24 | WubTheCaptain | Category | Suggestion => Documentation |
2018-12-17 05:49 | WubTheCaptain | Status | assigned => confirmed |
2019-06-23 08:33 | WubTheCaptain | Priority | normal => low |
2019-06-23 08:33 | WubTheCaptain | Target Version | 1.3 => |
2022-08-25 10:22 | WubTheCaptain | Assigned To | WubTheCaptain => |
Copyright © 2000 - 2024 MantisBT Team |