Comments (12)
That now builds OK, app seems to work mostly (some oddness on device naming to explore, lots to learn !)
The new cmake (v3.23.2) also works well, the original build instructions apply verbatim.
Thanks !
from dokit.
Hi @niallp 😄 Hmm. Curious. It works fine for me (with Qt 5.9.9 through to Qt 6.3.0).
paul@jafar:~/src/pokit-tmp$ cmake -E make_directory tmp-build
paul@jafar:~/src/pokit-tmp$ cmake -D CMAKE_BUILD_TYPE=Release -S . -B tmp-build
-- CMake version is 3.22.1
-- CMake build type is Release
-- The CXX compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Found Qt 6.2.4
-- Found Qt Bluetooth 6.2.4
-- Found Doxygen: /home/paul/bin/doxygen (found version "1.9.4 (5d15657a55555e6181a7830a5c723af75e7577e2)") found components: doxygen dot
-- Configuring done
-- Generating done
-- Build files have been written to: /home/paul/src/pokit-tmp/tmp-build
What version of CMake do you have?
cmake --version
CMake Error: The source directory "/home/niall/sandbox/qtpokit/tmp-build" does not appear to contain CMakeLists.txt.
That output kind of suggests that you changed into the tmp-build
directory before running the second cmake
command?
Perhaps try using absolute paths instead, like:
cmake -D CMAKE_BUILD_TYPE=Release -S ~/sandbox/qtpokit -B ~/sandbox/qtpokit/tmp-build
from dokit.
The 2nd cmake
call was made in same folder (root of cloned git repo), directly after executing the first cmake
... (all it seems to do is make a bare folder FWIW)
An older version of cmake
... v3.10.2, as far as I'm aware the default for Ubuntu 18.04.
I'll find a more recent install and try it there.
from dokit.
An older version of cmake ... v3.10.2
Ah, it seems -B
was added in CMake 3.13:
The cmake(1) command gained the
-B <build_dir>
command line option to specify the location of the build directory.
So, just cd
into the directory and adjust the -S
accordingly. eg:
cmake -E make_directory tmp-build
cd tmp-build
cmake -D CMAKE_BUILD_TYPE=Release -S ..
Cheers.
from dokit.
BTW, I suspect you'll need CMake 3.12 or later to build successfully, but let us know how you go.
from dokit.
It did get further without -B
, needed a few -dev packages (qtbase-dev, qtdeclarative5-dev, qtconnectivity5-dev) but eventually died from the CMake 3.12+ requirement... definitely need something newer.
What distro are you developing on ?
from dokit.
I'm mostly developing on Ubuntu 21.10 and 22.04, but the GitHub Actions CI builds are currently:
- Ubuntu 20.04.4
- macOS 11.6.6; and
- Windows Server 2022 10.0.203
You can probably relax the cmake 3.12 requirement if you're willing to forgo the CLI application's unit tests (you can still build and run the CLI app, just not the tests). I'll put up a modified branch for you in a couple of hours if you like, to try that option out.
Cheers.
from dokit.
can probably relax the cmake 3.12 requirement if you're willing to forgo the CLI application's unit tests
I don't have any CMake's old enough to test with, but have a go a the 1-cmake-pre-3.12 branch. It detects CMake's earlier than 3.12, and for those, it skips the CLI unit tests (since they depend on CMake's Object Libraries feature). So if you build with that branch, you should see CMake stating something like this in the initial output:
-- Skipping testAbstractCommand (needs CMake 3.12+)
-- Skipping testCalibrateCommand (needs CMake 3.12+)
-- Skipping testDeviceCommand (needs CMake 3.12+)
-- Skipping testDsoCommand (needs CMake 3.12+)
-- Skipping testFlashLedCommand (needs CMake 3.12+)
-- Skipping testInfoCommand (needs CMake 3.12+)
-- Skipping testLoggerFetchCommand (needs CMake 3.12+)
-- Skipping testLoggerStartCommand (needs CMake 3.12+)
-- Skipping testLoggerStopCommand (needs CMake 3.12+)
-- Skipping testMeterCommand (needs CMake 3.12+)
-- Skipping testScanCommand (needs CMake 3.12+)
-- Skipping testSetNameCommand (needs CMake 3.12+)
-- Skipping testStatusCommand (needs CMake 3.12+)
This shouldn't affect the code in any way, just means that some (CLI-only) unit tests will be skipped.
Let us know how it goes. Thanks 😄
from dokit.
Something different but not there yet:
niall@preston:~/sandbox/qtpokit/tmp-build$ cmake -D CMAKE_BUILD_TYPE=Release -S ..
-- CMake version is 3.10.2
-- CMake build type is Release
-- The CXX compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- QtPokit -pre
-- Found Qt 5.9.5
-- Found Qt Bluetooth 5.9.5
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.13") found components: doxygen dot
CMake Error at src/app/CMakeLists.txt:37 (target_link_libraries):
Object library target "PokitApp" may not link to anything.
-- Configuring incomplete, errors occurred!
See also "/home/niall/sandbox/qtpokit/tmp-build/CMakeFiles/CMakeOutput.log".
from dokit.
Ah yes, that's another place that it need CMake 3.12+. I'll need to have a think about the best way to get around that one (or not support pre-3.12).
from dokit.
Yet another reason for me to move on from 18.04 I guess ... ;)
from dokit.
Ok, I've just pushed another update to the 1-cmake-pre-3.12 branch. I've actually tested it against the same CMake version you have (3.10.2), and also as far back as CMake 3.1.3., so it should be good to go now (subject to the same unit tests limitation as before).
Note, it turns out to be really easy (on Ubuntu 21.10 at least) to use binary CMake versions from https://cmake.org/files/ - I highly recommend you download one of the latest ones, and give it a try 😉
But let us know how you go with the 1-cmake-pre-3.12 branch, and if its all good I can merge the changes into main
.
Cheers.
from dokit.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokit.