Hello,
I have run into trouble when building Pulseview. It apperars to be an
error related to libboost on versions less than 1.49
Pulseview claims it requires libboost, version at least 1.42:
http://sigrok.org/wiki/Building#Build_requirements
I am using version 1.49 of libboost:
$ apt-show-versions libboost-test-dev libboost-thread-dev
libboost-filesystem-dev libboost-system-dev
libboost-filesystem-dev/wheezy uptodate 1.49.0.1
libboost-system-dev/wheezy uptodate 1.49.0.1
libboost-test-dev/wheezy uptodate 1.49.0.1
libboost-thread-dev/wheezy uptodate 1.49.0.1
I cloned pulseview's git repository either today or yesterday.
After entering cmake ., when the make command is issued, I get the
following output:
$ make
[ 1%] Building CXX object CMakeFiles/pulseview.dir/main.cpp.o
In file included from /usr/include/glib-2.0/glib/gtypes.h:35:0,
from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from
/usr/local/include/libsigrokdecode/libsigrokdecode.h:26,
from /home/pi/sigrok/pulseview/main.cpp:22:
/usr/include/boost/thread/xtime.hpp:23:5: error: expected identifier
before numeric constant
TIME_UTC=1
^
/usr/include/boost/thread/xtime.hpp:23:5: error: expected ‘}’ before
numeric constant
/usr/include/boost/thread/xtime.hpp:23:5: error: expected
unqualified-id before numeric constant
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
from /usr/include/boost/thread/mutex.hpp:16,
from
/usr/include/boost/thread/pthread/thread_data.hpp:12,
from /usr/include/boost/thread/thread.hpp:17,
from /usr/include/boost/thread.hpp:13,
from /home/pi/sigrok/pulseview/pv/session.hpp:32,
from /home/pi/sigrok/pulseview/pv/mainwindow.hpp:29,
from /home/pi/sigrok/pulseview/main.cpp:38:
/usr/include/boost/thread/xtime.hpp:46:14: error: expected
type-specifier before ‘system_time’
operator system_time() const
^
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
from /usr/include/boost/thread/mutex.hpp:16,
from
/usr/include/boost/thread/pthread/thread_data.hpp:12,
from /usr/include/boost/thread/thread.hpp:17,
from /usr/include/boost/thread.hpp:13,
from /home/pi/sigrok/pulseview/pv/session.hpp:32,
from /home/pi/sigrok/pulseview/pv/mainwindow.hpp:29,
from /home/pi/sigrok/pulseview/main.cpp:38:
/usr/include/boost/thread/xtime.hpp: In function ‘int
xtime_get(xtime*, int)’:
/usr/include/boost/thread/xtime.hpp:73:40: error: ‘get_system_time’
was not declared in this scope
*xtp=get_xtime(get_system_time());
^
/usr/include/boost/thread/xtime.hpp:73:40: note: suggested alternative:
In file included from /usr/include/boost/thread/locks.hpp:12:0,
from /usr/include/boost/thread/pthread/mutex.hpp:12,
from /usr/include/boost/thread/mutex.hpp:16,
from
/usr/include/boost/thread/pthread/thread_data.hpp:12,
from /usr/include/boost/thread/thread.hpp:17,
from /usr/include/boost/thread.hpp:13,
from /home/pi/sigrok/pulseview/pv/session.hpp:32,
from /home/pi/sigrok/pulseview/pv/mainwindow.hpp:29,
from /home/pi/sigrok/pulseview/main.cpp:38:
/usr/include/boost/thread/thread_time.hpp:19:24: note:
‘boost::get_system_time’
inline system_time get_system_time()
^
In file included from /usr/include/boost/thread/pthread/mutex.hpp:14:0,
from /usr/include/boost/thread/mutex.hpp:16,
from
/usr/include/boost/thread/pthread/thread_data.hpp:12,
from /usr/include/boost/thread/thread.hpp:17,
from /usr/include/boost/thread.hpp:13,
from /home/pi/sigrok/pulseview/pv/session.hpp:32,
from /home/pi/sigrok/pulseview/pv/mainwindow.hpp:29,
from /home/pi/sigrok/pulseview/main.cpp:38:
/usr/include/boost/thread/xtime.hpp: At global scope:
/usr/include/boost/thread/xtime.hpp:88:1: error: expected declaration
before ‘}’ token
} // namespace boost
^
CMakeFiles/pulseview.dir/build.make:320: recipe for target
'CMakeFiles/pulseview.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/pulseview.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:60: recipe for target
'CMakeFiles/pulseview.dir/all' failed
make[1]: *** [CMakeFiles/pulseview.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2
This error has been traced down by the people at the Boost project,
it seems to be a naming issue: in libboost someone named a constant
with the same name as something else on the C11 standard: TIME_UTC:
https://svn.boost.org/trac/boost/ticket/6940
The solution was to rename the libboost constant to TIME_UTC_.
That was fixed in version 1.51 of the libboost libraries, according
to the ticket.
So I adquired libboost 1.55, and sure enough, Pulseview is building
so far:
$ make
[ 1%] Building CXX object CMakeFiles/pulseview.dir/main.cpp.o
[ 1%] Building CXX object CMakeFiles/pulseview.dir/pv/application.cpp.o
[ 2%] Building CXX object
CMakeFiles/pulseview.dir/pv/devicemanager.cpp.o
[ 3%] Building CXX object CMakeFiles/pulseview.dir/pv/mainwindow.cpp.o
[etc.]
Knowing this, I propose that the minimum version requirement for
libboost gets changed from 1.42 to at least 1.51. It could even be
1.55 for added safety, although I see no difference. The other way of
solving this is not using C11, but dropping support for a complete
compiler is worse than dropping support for an outdated version of a
library.
For the record, here is a list of the current versions of the
required packages for Pulseview on my system:
$ apt-show-versions git-core g++ make cmake libtool pkg-config \
> libglib2.0-dev libqt4-dev libboost-test-dev libboost-thread-dev\
> libboost-filesystem-dev libboost-system-dev
cmake/wheezy uptodate 2.8.9-1
g++/wheezy uptodate 4:4.6.3-8
git-core/wheezy uptodate 1:1.7.10.4-1+wheezy1+rpi2
libboost-filesystem-dev/jessie uptodate 1.55.0.2
libboost-system-dev/jessie uptodate 1.55.0.2
libboost-test-dev/jessie uptodate 1.55.0.2
libboost-thread-dev/jessie uptodate 1.55.0.2
libglib2.0-dev/wheezy uptodate 2.40.0-3rpi3rpi1
libqt4-dev/wheezy uptodate 4:4.8.2+dfsg-11+rpi1
libtool/wheezy uptodate 2.4.2-1.1
make/wheezy uptodate 4.0-7rpi2
pkg-config/wheezy uptodate 0.26-1
Note that g++ is actually 4.8.
This is on a system where sigrok-cli works and the sample driver works.
Cheers
-Iván Veloz
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now.http://goparallel.sourceforge.net/
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel