Closed damercer closed 5 years ago
I was able to install Boost 1.53 with the following: sudo apt-get install libboost1.53-all There might be newer versions but this worked to get me to the next step.
Need to include something like this to the Read.me list of needed steps.
But the next problem is with make command error(s):
pi@raspberrypi:/libsmu/build $ make Scanning dependencies of target smu [ 14%] Building CXX object src/CMakeFiles/smu.dir/device.cpp.o [ 28%] Building CXX object src/CMakeFiles/smu.dir/session.cpp.o [ 42%] Building CXX object src/CMakeFiles/smu.dir/usb.cpp.o [ 57%] Building CXX object src/CMakeFiles/smu.dir/device_m1000.cpp.o In file included from /home/pi/libsmu/src/device_m1000.hpp:22:0, from /home/pi/libsmu/src/device_m1000.cpp:7: /home/pi/libsmu/src/device_m1000.cpp: In member function ‘virtual ssize_t smu::M1000_Device::read(std::vector<std::array<float, 4u> >&, size_t, int, bool)’: /home/pi/libsmu/src/debug.hpp:14:68: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t {aka unsigned int}’ [-Wformat=]
^
/home/pi/libsmu/src/device_m1000.cpp:562:4: note: in expansion of macro ‘DEBUG’
DEBUG("%s: waiting %i ms for incoming samples: requested: %lu, available: %u\n",
^
/home/pi/libsmu/src/device_m1000.cpp: In member function ‘virtual void smu::M1000_Device::flush(int, bool)’:
/home/pi/libsmu/src/device_m1000.cpp:650:29: error: ‘class boost::lockfree::spsc_queue
^
/home/pi/libsmu/src/device_m1000.cpp:562:4: note: in expansion of macro ‘DEBUG’
DEBUG("%s: waiting %i ms for incoming samples: requested: %lu, available: %u\n",
^
/home/pi/libsmu/src/device_m1000.cpp: In member function ‘virtual void smu::M1000_Device::flush(int, bool)’:
/home/pi/libsmu/src/device_m1000.cpp:650:29: error: ‘class boost::lockfree::spsc_queue
Not sure how to proceed from here.
Doug
Hi Doug, From boost, you will need to install libboots-dev. There is a repository on gitlab https://gitlab.analog.com/Platformation/m1k-production-test on which we build libsmu on a Raspberry Pi for production testing. What we install is in setup_env.sh file. I hope this will be helpful. Mihai
Clicking on the above link (gitlab.analog.... ) says server not found??? Where is the correct location? Thanks Doug.
I was able to install libboots-dev and build libsmu. It seems to have made the smu executable, which seems to run, but the make install step does not seem to put the python bindings in the right place ( or anywhere I can see ) so import pysmu does not work.
Any help on making the steps outlined in the readme work correctly would be great. Thanks Doug
We may have to improve the readme a bit.
In any case [and in the meantime] one way to guess/understand how something gets built on Github is to take a look at the .travis.yml
or appveyor.yml
files. Travis is usually used for Linux/OS X builds, AppVeyor for Windows builds [at least on ADI repos].
[ On a broader spectrum, some repos are using CircleCI, which has a different configuration format than Travis-CI & AppVeyor, but this is more of a side-note ].
If you take a look here: https://github.com/analogdevicesinc/libsmu/blob/master/.travis.yml The steps and the requirements should be described [in various configuration elements]. These steps are usually meant to build on Ubuntu 14.04 [for Travis CI], but they do hold some good insight into how to extend to other platforms.
Now [obviously], this is not meant to replace a good readme, but [typically] source-code outpaces documentation [for various reasons] and this is one way that helps with building stuff.
Will close this as there's a duplicate now: https://github.com/analogdevicesinc/libsmu/issues/123
This of course assumes that one can read and understand the language used in .travis.yml or appveyor.yml files.
Anyway I was able to build a working libsmu from a newly cloned source from git hub but.... On subsequent attempts to recompile after making changes in various source files nothing changed in the actual libsmu that Python 2.7 was finding and using. I made changes to the source code that should have changed how the current (I) channel samples were converted from the raw 16 bit integers to floating point and nothing seemed to be different???
Doug
Building libsmu on a Raspberry Pi use to work. Have not tried it in a while. On a freshly updated Pi 3 Jessie. I followed the steps in the Read.me and at the cmake step it returned an error.
pi@raspberrypi:~/libsmu $ cmake build CMake Error at /usr/share/cmake-3.0/Modules/FindBoost.cmake:1198 (message): Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root directory containing Boost or BOOST_INCLUDEDIR to the directory containing Boost's headers. Call Stack (most recent call first): src/CMakeLists.txt:33 (find_package)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: Boost_INCLUDE_DIR (ADVANCED) used as include directory in directory /home/pi/libsmu/src
-- Configuring incomplete, errors occurred! See also "/home/pi/libsmu/build/CMakeFiles/CMakeOutput.log".
Here is the Cmake output log file as well:
CMakeOutput.log
Something about boost missing? Seems something has changed to break this on a Pi.
Thanks
Doug