Closed fusion809 closed 6 years ago
Hey Brenton I don't know much about OBS but i can try
the workflow i normally use is on the README
1. git submodule update --init --recursive
2. mkdir build
3. cd build
4. cmake -G Ninja -DBUILD_TESTS=ON -Dmmtf_build_local=ON -Dmmtf_build_examples=ON ..
5. ninja
6. chmod +x ./tests/mmtf_tests
7. ./tests/mmtf_tests
you're doing step 1 manually
you should probably add lines to do steps 2 and 3
then it looks like this command
%cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMSGPACKC_INCLUDE_DIR=msgpack-c/include
should be
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_TESTS=OFF -Dmmtf_build_local=ON -Dmmtf_build_examples=OFF ..
or no ..
at the end if you don't want to build in build
We have mmtf_build_local
if you want to use our msgpack (it looks like you do) but since applications might package their own messagepack (usually installed into the system via apt-get or yum, or just their own submodule of messagepack-c)
There might be a bug in the CMakeLists.txt
, but since FindMsgpack.cmake
isn't packaged with msgpack-c, it's difficult to know what we should actually be searching for with find_package(msgpack)
let me know if that helps!
It helps, it's just now I'm surprised there's no install target in the Makefile and I'm not sure how to install mmtf system-wide now. I'm not sure which files to copy across. Some are obvious like the includes/ folder, build/examples/ and build/tests/ directory.
See I'm making a package for MMTF in the openSUSE Build Service as it is now a build dependency of Avogadro2 (I build a bleeding-edge package for it),
The library is include only and as such I believe that it is sufficient to just copy the content of the include folders (include and msgpack-c/include) into a system-wide include folder. The build/examples and build/tests are just meant as examples and tests and as such are not necessary for an installation for anyone wanting to use mmtf-cpp.
Thanks mate. That's what I love about open-source, how helpful people tend to be to their fellow human being.
Hi,
I have written a spec file for building this in the openSUSE Build Service (OBS). Here it is in full. In it I'm essentially downloading a tar.gz archive of:
Then:
Then running (most of this is inherited from the
%cmake
macro):(and yes I have tried omitting the final line and it returned the same error as it doesn't seem to be recognized by cmake) and I received the output:
(ignore the
[ ns]
at the start that's related to the OBS). I've checked out your CMakeLists.txt file and it seems like cmake should run fine without any need to manually specify the MSGPACKC_INCLUDE_DIR variable, so long as the msgpack-c source directory is in the top level of this project's source directory. So since this is the case, this would seem to qualify as a bug in this project's cmake set up.Thanks for your time, Brenton