(Mac OS 10.9) Boost.Python build quickstart: Unable to load Jamfile - macos

I have installed Boost 1.55 (+python33), boost-build and boost-jam through Macports on Mac OS X 10.9.
Following the HOWTO (http://www.boost.org/doc/libs/1_55_0b1/libs/python/doc/building.html), I
cd to /opt/local/share/doc/boost/libs/python/example/quickstart and typed in bjam toolset=gcc
--verbose-test test and just bjam and I got the following error message:
/opt/local/share/boost-build/build/project.jam:271: in find-jamfile from module project
error: Unable to load Jamfile.
error: Could not find a Jamfile in directory '../../../..'.
error: Attempted to find it with pattern '[Bb]uild.jam [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam'.
error: Please consult the documentation at 'http://www.boost.org'.
/opt/local/share/boost-build/build/project.jam:290: in load-jamfile from module project
/opt/local/share/boost-build/build/project.jam:68: in project.load from module project
/opt/local/share/boost-build/build/project.jam:718: in project.use from module project
/opt/local/share/boost-build/build/project.jam:95: in load-used-projects from module project
/opt/local/share/boost-build/build/project.jam:79: in load from module project
/opt/local/share/boost-build/build/project.jam:170: in project.find from module project
/opt/local/share/boost-build/build-system.jam:248: in load from module build-system
/opt/local/share/boost-build/kernel/modules.jam:261: in import from module modules
/opt/local/share/boost-build/kernel/bootstrap.jam:132: in boost-build from module
/opt/local/share/doc/boost/libs/python/example/quickstart/boost-build.jam:8: in module scope from module
Clearly the Macports put the files in some "non-default" locations. For example, the boost-build directory (specified in boost-build.jam) is in /opt/local/share/doc/boost/tools/build/v2. In the file Jamroot:
# Specify the path to the Boost project. If you move this project,
# adjust the path to refer to the Boost root directory.
use-project boost
: ../../../.. ;
Clearly the desired jamefile is not in ../../../.. on Macports installation.
My question is: where is the desired jamefile located in Macports installation of boost? What path should I specify in Jamroot?

Related

Not accessing the correct package

I have to use qdiscs in some part of my project. so i was using the below command and got this error. the problem is there is libnl3 package prersent but it is searhing for libnl version.
nl-qdisc-add --dev=veth-host --parent=root --update plug --buffer
Error: Unable to load module "/usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so": /usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so: cannot open shared object file: No such file or directory
So I tried this solution mentioned in comments, but its not working. cannot comment on this link due to reputation.
I changed the 4th step to ./configure --prefix=/usr/local --with-pkgconfigdir=/usr/local/lib because of some error it was giving.
It throws this error:
/usr/local/sbin/nl-qdisc-add --dev=veth-host --parent=root plug --limit=32768
/usr/local/sbin/nl-qdisc-add: /lib/x86_64-linux-gnu/libnl-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
/usr/local/sbin/nl-qdisc-add: /usr/lib/x86_64-linux-gnu/libnl-cli-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
/usr/local/sbin/nl-qdisc-add: /usr/lib/x86_64-linux-gnu/libnl-route-3.so.200: no version information available (required by /usr/local/sbin/nl-qdisc-add)
Error: Unable to load module "/usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so": /usr/lib/x86_64-linux-gnu/libnl/cli/qdisc/plug.so: cannot open shared object file: No such file or directory
I'm using the system ubuntu 19.10

How to fix library dependence in a conan package

I am trying to install qt/5.14.2 with conan.
Using
qt/5.14.2#bincrafters/stable
I receive
ERROR: libpq/11.5: Error in package_info() method, line 211
self.cpp_info.components["pq"].requires.append("zlib::zlib")
AttributeError: 'Component' object has no attribute 'requires'
OK, there is a bug in libpq/11.5
I am trying to downgrade to
libpq/11.4#bincrafters/stable
ERROR: Conflict in qt/5.14.2#bincrafters/stable:
'qt/5.14.2#bincrafters/stable' requires 'zlib/1.2.11' while 'libpq/11.4#bincrafters/stable' requires 'zlib/1.2.11#conan/stable'.
To fix this conflict you need to override the package 'zlib' in your root package.
BTW:
Why is it not enough to require the correct version of the library, and requiring the same repository? (and require two different repositories in two different packages for the same dependence)
OK, I attempted
zlib/1.2.11#bincrafters/stable
WARN: libpq/11.4#bincrafters/stable: requirement zlib/1.2.11#conan/stable overridden by your conanfile to zlib/1.2.11#bincrafters/stable
zlib/1.2.11#bincrafters/stable: Not found in local cache, looking in remotes...
zlib/1.2.11#bincrafters/stable: Trying with 'conan-center'...
zlib/1.2.11#bincrafters/stable: Trying with 'minres'...
zlib/1.2.11#bincrafters/stable: Trying with 'bincrafters'...
ERROR: Failed requirement 'zlib/1.2.11#bincrafters/stable' from 'libpq/11.4#bincrafters/stable'
ERROR: Unable to find 'zlib/1.2.11#bincrafters/stable' in remotes
Finally, I arrived at
libpq/11.4#bincrafters/stable
zlib/1.2.11#conan/stable
qt/5.14.2#bincrafters/stable
After this, it looks like it was oK:
Installing (downloading, building) binaries...
qt/5.14.2#bincrafters/stable: Retrieving package 93c70de10405da9f2d5a1f42b8c299ca7af869d2 from remote 'bincrafters'
Downloading conanmanifest.txt
Downloading conaninfo.txt
Downloading conan_package.tgz
....qt/5.14.2#bincrafters/stable: Package installed 93c70de10405da9f2d5a1f42b8c299ca7af869d2
qt/5.14.2#bincrafters/stable: Downloaded package revision 0
However, the install fails with
CMake was unable to find Qt5, put qmake in your path or set
QTDIR/QT_QMAKE_EXECUTABLE.
The package is downloaded, I see all components in the corresponding subdirectory in my home directory. However, unlike the other components, it is not installed, before CMake attempts to find it.
What do I wrong?
In case of any strange behavior of conan, upgrade! For me, switch 1.24.0 -> 1.28.1 with configs clean up fixed the same problem with libpq/11.5

Install ROS2 on OS X - Error: No module named 'rclpy._rclpy'

I am trying to install ros2 env in Mac. I created a conda env for it.
I have installed conda install -c anaconda sphinx and conda install -c conda-forge sphinx-autodoc-typehints.
I got the errors when I ran ros2 run demo_nodes_cpp talker:
Failed to load entry point 'test': No module named 'rclpy._rclpy'
Failed to load entry point 'launch': No module named 'rclpy._rclpy'
Failed to load entry point 'info': No module named 'rclpy._rclpy'
.
.
.
Failed to load entry point 'list': No module named 'rclpy._rclpy'
Failed to load entry point 'pub': No module named 'rclpy._rclpy'
dyld: Library not loaded: /usr/local/opt/poco/lib/libPocoFoundation.63.dylib
Referenced from: /Users/linfeng/workspace/ros2_dashing/ros2-osx/lib/librosidl_typesupport_c.dylib
Reason: image not found
Any idea? Thank you in advance
I got it working by linking the newer installed poco version:
ln -s /usr/local/opt/poco/lib/libPocoFoundation.71.dylib /usr/local/opt/poco/lib/libPocoFoundation.63.dylib

Access denied error in boost-bjam isntallation

i'm trying to lunch bjam as a step to install the boost library, needed to run Cufflinks (RNASeq analysis software).
however, when i run the code:
$ ./bjam --prefix=/cygdrive/c/cygdrive/c/Boost/include/boost-1_53/boost -- toolset=gcc architecture=x86 address_model=32 link=static runtime-link=static stage install
i get the following error
Access is denied.
Access is denied.
Access is denied.
Access is denied.
C:/Users/se24553/Downloads/boost_1_53_0/tools/build/v2/build\property.jam:328: in validate1 from module property
error: Invalid property '<address_model>32': unknown feature 'address_model'.
C:/Users/se24553/Downloads/boost_1_53_0/tools/build/v2/build\property.jam:337: in property.validate from module property
C:/Users/se24553/Downloads/boost_1_53_0/tools/build/v2/build\build-request.jam:216: in convert-command-line-element from module build-request
C:/Users/se24553/Downloads/boost_1_53_0/tools/build/v2/build\build-request.jam:154: in build-request.from-command-line from module build-request
C:/Users/se24553/Downloads/boost_1_53_0/tools/build/v2\build-system.jam:613: in load from module build-system
C:\Users\se24553\Downloads\boost_1_53_0\tools\build\v2/kernel\modules.jam:283: in import from module modules
C:\Users\se24553\Downloads\boost_1_53_0\tools\build\v2/kernel/bootstrap.jam:142: in boost-build from module
C:\Users\se24553\Downloads\boost_1_53_0\boost-build.jam:17: in module scope from module
and I don't really know how to overcome that.
the directory /cygdrive/c/cygdrive/c/Boost/ (and i tried to use only this path but the result is the same) is where i have installed the various files using the code b2 install --prefix=/cygdrive/c/cygdrive/c/Boost/, however, it contains two folders include and lib, lib is empty while include contains --> boost-1_53 --> boost and here there are all the other folders and the .hpp files.
i am using cygdrive on Win 7 if that helps!
thanks :)
I had the same problem:
In windows 7 your bin directory may be protected:
$ chmod -R a+r bin
$ chmod -R a+x bin
How to compile Boost (and link?) libraries in cygwin windows7 i686-w64-mingw32-g++ with bjam
Barthelemy

OS X 10.8.2 python 3 import sqlite error

Both brew installed python3 and manually compiled python3 with -–enable-loadable-sqlite-extensions fails when import sqlite from python3 shell. Please help!
The module is named sqlite3, not sqlite:
import sqlite3
http://docs.python.org/3/library/sqlite3.html
Update: Now that we've cleared up the module name, the problem being reported:
ImportError: No module named '_sqlite3'
means that your Python instance cannot find the C extension module, _sqlite3.so, that is part of the sqlite3 module in the standard library. Since the file path of the dbapi2.py in the traceback looks reasonable, the issue is probably not a path issue (sys.path). Most likely the _sqlite3 extension module failed to build or link. Check the output from your Python build for errors. OS X 10.8 includes a version of sqlite3 but for security reasons it does not include the optional loadable extensions feature. Your Python build likely included this message:
Failed to build these modules:
_sqlite3
and, earlier, this:
*** WARNING: renaming "_sqlite3" since importing it failed: dlopen(build/lib.macosx-10.8-x86_64-3.3-pydebug/_sqlite3.so, 2): Symbol not found: _sqlite3_enable_load_extension
Referenced from: build/lib.macosx-10.8-x86_64-3.3-pydebug/_sqlite3.so
Expected in: flat namespace
in build/lib.macosx-10.8-x86_64-3.3-pydebug/_sqlite3.so
The solution is to build and install a separate copy of sqlite3 that is built with the loadable extensions feature. If you are using Homebrew, its sqlite recipe with the with-functions option should do that. Then rebuild Python.
Homebrew provides python3 with sqlite3 support and loadable modules.
brew install python3 will do the right thing (and brew sqlite, too).
There was a bug, that probably struck you, but it has been fixed

Resources