Steps I followed for build of webRTC in UBUNTU env.
Check out the code:
gclient config https://webrtc.googlecode.com/svn/trunk
echo "target_os = ['android', 'unix']" >> .gclient
gclient sync --nohooks
Generate ninja makefiles:
cd trunk
$./build/install-build-deps-android.sh
$. build/android/envsetup.sh
Defaulting GYP_GENERATORS to ninja
$gclient runhooks
$android_gyp
result of android_gyp:
GYP_GENERATORS set to 'ninja'
Updating projects from gyp files...
gyp: /home/user/webRTC/trunk/chrome/chrome_resources.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/tools/android/findbugs_plugin/findbugs_plugin.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sql/sql.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/tools/android/android_tools.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sync/sync.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/sandbox/sandbox.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/net/net.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/media/media.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/ipc/ipc.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/gpu/gpu.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/components/components_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/base/base.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/breakpad/breakpad.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/base/android/jni_generator/jni_generator.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/third_party/cacheinvalidation/cacheinvalidation.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/remoting/remoting.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/chrome/chrome.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/android_webview/android_webview.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/mojo/mojo.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/content/content_shell_and_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/ui/ui_unittests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/cc/cc_tests.gyp not found (cwd: /home/user/webRTC/trunk)
gyp: /home/user/webRTC/trunk/third_party/WebKit/public/all.gyp not found (cwd: /home/user/webRTC/trunk)
Build and Install Demo app:
$ ninja -C out/Debug video_demo_apk
ninja: Entering directory 'out/Debug'
ninja: error: unknown target 'AppRTCDemo'
please let me know if I've donw any steps wrong.
I think android_gyp is giving problem, but donno.
Note: I'm using Ubuntu(VMware) on my windows OS
here are my notes for building the AppRTCDemo on Ubuntu 12.04.4, obviously your directories may be slightly different.
## building webrtc
# install dependencies:
sudo apt-get install git git-svn subversion g++ python libnss3-dev libasound2-dev libpulse-dev libjpeg62-dev libxv-dev libgtk2.0-dev libexpat1-dev lib32asound2-dev ia32-libs
# create a working directory:
mkdir -p ~/git/working
cd ~/git/working
# get the depottools:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Add depot_tools to your PATH:
echo "PATH=\$PATH:$HOME/git/working/depot_tools" >> ~/.bash_aliases
echo "export PATH" >> ~/.bash_aliases
. ~/.bash_aliases
# get the WebRTC source:
gclient config http://webrtc.googlecode.com/svn/trunk
# configure for android:
echo "target_os = ['android', 'unix']" >> .gclient
# synchronize:
gclient sync --nohooks
# set up env variables:
source ~/git/working/trunk/build/android/envsetup.sh
# install new dependencies:
sudo ~/git/working/trunk/build/./install-build-deps-android.sh
sudo ~/git/working/trunk/build/./install-build-deps.sh
# Set up webrtc-related GYP variables:
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_java=1 $GYP_DEFINES"
# generate the build scripts:
gclient runhooks
# install find_depot_tools dummy file:
wget -O ~/git/working/trunk/build/find_depot_tools.py http://webrtc.googlecode.com/svn/trunk/webrtc/build/find_depot_tools.py
# build the Debug version of the AppRTCDemo:
ninja -C out/Debug AppRTCDemo
I got the same ninja: error: unknown target 'AppRTCDemo' error on Mac. To resolve this error, I had to specify a valid demo app. For iOS its AppRTCMobile instead of AppRTCDemo as stated in the docs.
ninja -C out/Debug-sim32 AppRTCMobile
The RTC Mobile demo exists in the gclient checkout: src/webrtc/examples/objc
https://chromium.googlesource.com/external/webrtc/+/master/webrtc/examples/objc/AppRTCMobile/
Related
While installing xorg with conan install .. command,
system requirements are checked in conan receipe using pkg-config tool.
Each missing system package raises an exception, and thus stop the conan install command.
ERROR: xorg/system: Error in package_info() method, line 97
self._fill_cppinfo_from_pkgconfig(name)
while calling '_fill_cppinfo_from_pkgconfig', line 24
if not pkg_config.provides:
ConanException: pkg-config command ['pkg-config', '--print-provides', 'xcb-renderutil', '--print-errors'] failed with error: Command 'pkg-config --print-provides xcb-renderutil --print-errors' returned non-zero exit status 1.
Package xcb-renderutil was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-renderutil.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xcb-renderutil' found
I cannot get those system packages to be installed by conan tool, am I missing a command line argument while invoking conan ?
you can ask conan to install binary packages into your system ( sudo apt-get install ... ) by himself. See my example:
sudo conan install /home/username/QtProj/console_test1/QCoreApplication_quit_example/conanfile.txt --build=qt -c tools.system.package_manager:mode=install
To use it your conan version must be installed using sudo. If you get:
sudo: conan: command not found
You should do:
pip uninstall conan
sudo pip install conan
There are usually distribution-specific package manager warnings listing what dependencies need to be installed above this line:
ERROR: xorg/system:...
For example, on Ubuntu 22.04 I got the following after adding opencv/4.5.5 to my conanfile.txt:
...
dpkg-query: no packages found matching libx11-xcb-dev
dpkg-query: no packages found matching libfontenc-dev
dpkg-query: no packages found matching libxaw7-dev
dpkg-query: no packages found matching libxkbfile-dev
dpkg-query: no packages found matching libxmu-dev
dpkg-query: no packages found matching libxmuu-dev
...
ERROR: xorg/system:...
You can resolve this by installing the listed dependencies. In my case this is what solved it:
sudo apt-get install -y xorg openbox xauth libx11-xcb-dev libx11-xcb-dev libfontenc-dev libxaw7-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev
I am trying to install openpose in Ubuntu 20.04 using CMAKE and I get the following error:
Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
I am following the instructions here (unfortunately, the screenshots are not available but I just followed the textual commands):
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/README.md
I made a build folder in openpose folder and then ran the cmake-gui .. command.
A GUI opens with all these checked (I don't change anything):
and the error is:
GCC detected, adding compile flags
GCC detected, adding compile flags
Building with CUDA.
CUDA detected: 10.1
Added CUDA NVCC flags for: sm_75
cuDNN not found
Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
CMake Warning at /usr/share/cmake-3.16/Modules/FindProtobuf.cmake:499 (message):
Protobuf compiler version 3.13.0 doesn't match library version 3.6.1
Call Stack (most recent call first):
CMakeLists.txt:429 (find_package)
Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
Found OpenCV: /usr (found version "4.2.0")
cuDNN not found.
#!/bin/bash
echo "This script assumes Ubuntu 16 or 14 and Nvidia Graphics card up to 10XX. Otherwise, it will fail."
# Install cuDNN 5.1
if [[ $UBUNTU_VERSION == *"14."* ]] || [[ $UBUNTU_VERSION == *"15."* ]] || [[ $UBUNTU_VERSION == *"16."* ]]; then
CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
wget -c ${CUDNN_URL}
sudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local
rm cudnn-8.0-linux-x64-v5.1.tgz && sudo ldconfig
else
echo "cuDNN NOT INSTALLED! Ubuntu 16 or 14 not found. Install cuDNN manually from 'https://developer.nvidia.com/cudnn'."
fi
CMake Error at CMakeLists.txt:520 (message):
Install cuDNN using the above commands. or turn off cuDNN by setting
USE_CUDNN to OFF.
Configuring incomplete, errors occurred!
See also "/home/mona/research/code/openpose/build/CMakeFiles/CMakeOutput.log".
See also "/home/mona/research/code/openpose/build/CMakeFiles/CMakeError.log".
Then, I installed gflags using sudo apt-get install libgflags-dev command but I still get the same error. How could I fix this problem?
This is the git log to see which version of repo I am at for reproducing the error:
$ git log
commit a255747af22116ad76004437456bb531dc5d0b23 (HEAD -> master, origin/master, origin/HEAD)
Author: Wlad Meixner <9556979+gosticks#users.noreply.github.com>
Date: Mon Dec 21 22:01:10 2020 +0100
Fix possible typo (#1802)
The CMakeOutput.log and CMakeError.log can be found here https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1814
$ sudo apt install libgoogle-glog-dev
Also,
$ sudo apt-get install libgflags-dev
$ sudo apt install libgoogle-glog-dev
$ sudo apt-get install protobuf-compiler libprotobuf-dev
since initially I didn't have any of them installed.
If you have run it from the command line you should have see them...
if (NOT GLOG_FOUND)
message(FATAL_ERROR "Glog not found. Install Glog from the command line using the command(s) -\
sudo apt-get install libgoogle-glog-dev")
endif (NOT GLOG_FOUND)
if (NOT GFLAGS_FOUND)
message(FATAL_ERROR "GFlags not found. Install GFlags from the command line using the command(s) --\
sudo apt-get install libgflags-dev")
endif (NOT GFLAGS_FOUND)
if (NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV not found. Install OpenCV from the command line using the command(s) --\
sudo apt-get install libopencv-dev")
endif (NOT OpenCV_FOUND)
ref: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/5a9acc730915f2171badcf10076aef9213f38e01/CMakeLists.txt#L523-L537
note: A better way, would be to use FetchContent() when third parties are missing (since they provide a CMake based build), also the command provided is ubuntu only...
Former marine grunt here! New to python and coding. Trying to install DLIB for python 2.7. I run the command pip install dlib and keep getting this error message:
Collecting dlib
Using cached dlib-19.1.0.tar.gz
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', \n');f.close();exec(compile(code, __file__, 'exec'))"
bdist_wheel -d c:\users\pickfl~1\appdata\local\temp\tmpcvgy9jpip-wheel- --python-tag cp27:
running bdist_wheel
running build
Detected Python architecture: 32bit
Detected platform: win32
Configuring cmake ...
-- Building for: NMake Makefiles
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error in CMakeLists.txt:
The CMAKE_CXX_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Pickflickr1/AppData/Local/Temp/pip-build-4qhao2/dlib/tools/python/build/CMakeFiles/CMakeError.log".
error: cmake configuration failed!
---------------------------------------- Failed building wheel for dlib
Along with this:
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\pickfl~1\\appdata\\local\\temp\\pip-build-4qhao2\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install
--record c:\users\pickfl~1\appdata\local\temp\pip-l8pcsq-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\pickfl~1\appdata\local\temp\pip-build-4qhao2\dlib\
Any feedback or help would be great! Former jarhead so bear with me, thanks.
Try this:
conda install -c menpo dlib=18.18
First Install all the dependencies for dlib library :->
sudo apt-get install python-dev python-pip
sudo apt-get install build-essential cmake pkg-config
sudo apt-get install libx11-dev libatlas-base-dev
sudo apt-get install libgtk-3-dev libboost-python-dev
Then Execute
pip install dlib
Enjoy computer-vision.....
“A lot of the future of search is going to be about pictures. Computer vision technology is going to be a big deal”
Ben Silbermann
First you need to have pip installed. Then you can download the dlib python 2.7 version from "https://pypi.python.org/pypi/dlib/18.17.100" website where you will get wheel of dlib. And then use normal procedure like pip install 'path to dlib wheel'.
For ex. f you have saved .whl file to downloads folder then type pip install C:\Users\XYZ\Downloads\dlib-18.17.100-cp27-none-win32.whl.
This will surely work. When I tried I didn't get any error and dlib got successfully installed.
Cheers
The pip package might be broken or might not be updated. Anyway, download the dlib_master from :https://github.com/davisking/dlib.git
After that there is an easy guide for installation in python. Go to the folder containing setup.py and then open terminal or whatever and type
sudo python setup.py install.
Please don't call this a duplicate.
All the answers have so far only 'solved' the problem by installing the ldap and other development packages globally, which doesn't solve the problem of not being able to install the python-ldap package in the virtual environment.
Examples include:
How do I install python-ldap in a virtualenv on Ubuntu?
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
I am using ubuntu 14.04, python 2.7 and flask in my virtual environment.
When I run pip install python-ldap, I receive the following error.
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.21 -IModules -I/usr/include -I/usr/include/sasl -I/usr/local/include -I/usr/local/include/sasl -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
Modules/LDAPObject.c:18:18: fatal error: sasl.h: No such file or directory
#include <sasl.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/kmertig/hd_request/hd_request/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-V4vhsl/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-NIR67Y-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/kmertig/hd_request/hd_request/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-build-V4vhsl/python-ldap
If I try to pip install any of the suggested dev libraries so that they are inside my virtual environment, I get the following error.
Could not find a version that satisfies the requirement libsasl2-dev (from versions: ) No matching distribution found for libsasl2-dev
I can install all this stuff globally just fine, but that just plain defeats the purpose of using virtualenv.
I would really like to find a meaningful, virtualenv solution, since all I have been able to find is non-virtualenv solutions for a virtualenv question.
Thanks.
The Python package python-ldap requires some other libs (libsasl2-dev, …) which are not python libs (so you can't use pip to install them). So, to use them, you have to install them. Two solutions:
use your package manager to install them (ex.: apt-get) ;
download their source code and compile them locally (in your virtualenv) (useful for some libs in special cases).
Maybe you can try the second solution?
I'm trying to create mingw binaries for boost on a Linux machine. The mingw compiler is present on my system as /usr/bin/i586-mingw32msvc-g++ and I have been able to create a simple HelloWorld.exe application.
Here is an exact list of my actions:
$ tar xvf boost_1_46_1.tar.gz
$ cd boost_1_46_1/
$ echo "using gcc : 4.4.4: i586-mingw32msvc-g++ ;" > user-config.jam
$ ./bootstrap.sh
$ ./bjam toolset=gcc target-os=windows
The result is this:
Building the Boost C++ Libraries.
...found 83 targets...
...updating 9 targets...
common.mkdir bin.v2
common.mkdir bin.v2/libs
common.mkdir bin.v2/libs/regex
common.mkdir bin.v2/libs/regex/build
common.mkdir bin.v2/libs/regex/build/gcc-mingw-4.4.4
common.mkdir bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug
common.mkdir bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows
gcc.compile.c++ bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows/has_icu_test.o
In file included from /usr/include/unicode/pwin32.h:123,
from /usr/include/unicode/umachine.h:47,
from /usr/include/unicode/uversion.h:47,
from libs/regex/build/has_icu_test.cpp:12:
/usr/include/inttypes.h:290: warning: ISO C++ 1998 does not support ‘long long’
/usr/include/inttypes.h:291: warning: ISO C++ 1998 does not support ‘long long’
libs/regex/build/has_icu_test.cpp: In function ‘int main()’:
libs/regex/build/has_icu_test.cpp:24: warning: unused variable ‘c’
gcc.link bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows/has_icu.exe
/usr/lib/gcc/i586-mingw32msvc/4.4.4/../../../../i586-mingw32msvc/bin/ld: cannot find -licuuc
collect2: ld returned 1 exit status
"i586-mingw32msvc-g++" -L"/usr/bin" -L"/usr/lib" -Wl,-R -Wl,"/usr/bin" -Wl,-R -Wl,"/usr/lib" -Wl,-rpath-link -Wl,"/usr/bin" -Wl,-rpath-link -Wl,"/usr/lib" -o "bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows/has_icu.exe" -Wl,--start-group "bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows/has_icu_test.o" -Wl,-Bstatic -Wl,-Bdynamic -licuuc -licui18n -licudata -Wl,--end-group -g
...failed gcc.link bin.v2/libs/regex/build/gcc-mingw-4.4.4/debug/target-os-windows/has_icu.exe...
...failed updating 1 target...
...updated 8 targets...
Performing configuration checks
- has_icu builds : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
...found 8 targets...
...updating 6 targets...
common.mkdir bin.v2/libs/math
common.mkdir bin.v2/libs/math/config
common.mkdir bin.v2/libs/math/config/gcc-mingw-4.4.4
common.mkdir bin.v2/libs/math/config/gcc-mingw-4.4.4/debug
common.mkdir bin.v2/libs/math/config/gcc-mingw-4.4.4/debug/target-os-windows
gcc.compile.c++ bin.v2/libs/math/config/gcc-mingw-4.4.4/debug/target-os-windows/has_gcc_visibility.o
cc1plus: warnings being treated as errors
libs/math/config/has_gcc_visibility.cpp: In function ‘int main()’:
libs/math/config/has_gcc_visibility.cpp:13: error: visibility attribute not supported in this configuration; ignored
"i586-mingw32msvc-g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -Werror -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -I"." -c -o "bin.v2/libs/math/config/gcc-mingw-4.4.4/debug/target-os-windows/has_gcc_visibility.o" "libs/math/config/has_gcc_visibility.cpp"
...failed gcc.compile.c++ bin.v2/libs/math/config/gcc-mingw-4.4.4/debug/target-os-windows/has_gcc_visibility.o...
...failed updating 1 target...
...updated 5 targets...
- ../config//has_gcc_visibility builds : no
...found 46 targets...
...updating 1 target...
gcc.compile.c++ bin.v2/libs/math/config/gcc-mingw-4.4.4/debug/target-os-windows/has_long_double_support.o
...updated 1 target...
- ../config//has_long_double_support builds : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
************************************************************
Trying to build Boost.Thread with pthread support.
If you need pthread you should specify the paths.
You can specify them in site-config.jam, user-config.jam
or in the environment.
For example:
PTW32_INCLUDE=C:\Program Files\ptw32\Pre-built2\include
PTW32_LIB=C:\Program Files\ptw32\Pre-built2\lib
************************************************************
/home/francis/orig/boost_1_46_1/tools/build/v2/build/virtual-target.jam:1079: in virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target: <pstage/lib>libboost_date_time.a
error: previous virtual target { common%common.copy-libboost_date_time.a.STATIC_LIB { gcc%gcc.archive-libboost_date_time.a.STATIC_LIB { gcc%gcc.compile.c++-gregorian/greg_month.o.OBJ { gregorian/greg_month.cpp.CPP } } { gcc%gcc.compile.c++-gregorian/greg_weekday.o.OBJ { gregorian/greg_weekday.cpp.CPP } } { gcc%gcc.compile.c++-gregorian/date_generators.o.OBJ { gregorian/date_generators.cpp.CPP } } } }
error: created from ./stage-proper
error: another virtual target { common%common.copy-libboost_date_time.a.STATIC_LIB { gcc%gcc.archive-libboost_date_time.a.STATIC_LIB { gcc%gcc.compile.c++-gregorian/greg_month.o.OBJ { gregorian/greg_month.cpp.CPP } } { gcc%gcc.compile.c++-gregorian/greg_weekday.o.OBJ { gregorian/greg_weekday.cpp.CPP } } { gcc%gcc.compile.c++-gregorian/date_generators.o.OBJ { gregorian/date_generators.cpp.CPP } } } }
error: created from ./stage-proper
error: added properties: <debug-symbols>off <define>NDEBUG <inlining>full <optimization>speed <runtime-debugging>off <variant>release
error: removed properties: <debug-symbols>on <inlining>off <optimization>off <runtime-debugging>on <variant>debug
/home/francis/orig/boost_1_46_1/tools/build/v2/build/virtual-target.jam:490: in actualize-no-scanner from module object(file-target)#3884
/home/francis/orig/boost_1_46_1/tools/build/v2/build/virtual-target.jam:135: in object(file-target)#3884.actualize from module object(file-target)#3884
/home/francis/orig/boost_1_46_1/tools/build/v2/build-system.jam:748: in load from module build-system
/home/francis/orig/boost_1_46_1/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/francis/orig/boost_1_46_1/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/francis/orig/boost_1_46_1/boost-build.jam:17: in module scope from module
It says libicu is not found on my system, but according to Synaptic Package Manage I have the libicu-dev package installed.
I'm not sure how to get it right. Can anyone help?
Update 1
Following #Luke's recoommendation I now gcc-mingw toolset. So now my build instructions look like this:
tar xvf boost_1_46_1.tar.gz
cd boost_1_46_1/
echo "using gcc : 4.4.4: i586-mingw32msvc-g++ ;" > user-config.jam
./bootstrap.sh
./bjam toolset=gcc-mingw target-os=windows
Which leads to the following errors:
error: toolset gcc initialization:
error: version 'mingw' requested but 'g++-mingw' not found and version '4.4.5' of default 'g++' does not match
error: initialized from
/home/francis/orig/boost-mingw/boost_1_46_1/tools/build/v2/build/toolset.jam:38: in toolset.using from module toolset
/home/francis/orig/boost-mingw/boost_1_46_1/tools/build/v2/build-system.jam:481: in process-explicit-toolset-requests from module build-system
/home/francis/orig/boost-mingw/boost_1_46_1/tools/build/v2/build-system.jam:561: in load from module build-system
/home/francis/orig/boost-mingw/boost_1_46_1/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/francis/orig/boost-mingw/boost_1_46_1/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/francis/orig/boost-mingw/boost_1_46_1/boost-build.jam:17: in module scope from module
Update 2
I have also tried specifying gcc-mingw in the user-config.jam file. Then my build instructions look like this:
tar xvf boost_1_46_1.tar.gz
cd boost_1_46_1/
echo "using gcc-mingw : 4.4.4: i586-mingw32msvc-g++ ;" > user-config.jam
./bootstrap.sh
./bjam toolset=gcc-mingw target-os=windows
Which leads to:
error: version 'mingw' requested but 'g++-mingw' not found and version '4.4.5' of default 'g++' does not match
Update 3
Specifying g++-mingw in the user-config.jam file:
using g++-mingw : 4.4.4: i586-mingw32msvc-g++ ;
...leads to the same error.
I got similar error messages. Eventually I was able to compile it using exactly the following commands:
$ echo "using gcc : : i686-w64-mingw32-g++ ;" > user-config.jam
$ ./bootstrap.sh
$ ./b2 --user-config=user-config.jam toolset=gcc-mingw target-os=windows release
I believe your problem is that you don't specify the "--user-config=user-config.jam" parameter. The next problem I encountered was that there will be a name conflict unless I specify either debug or release build (--layout=tagged or --layout=versioned might work also).
Cross-compiling boost 1.72.0 for Windows on Ubuntu 18.04
Install MinGW
$ sudo apt install mingw-w64 mingw-w64-tools
$ sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
$ sudo update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix
$ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
$ sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
32-bit Compilation (install path: ./boost-x86)
$ echo "using gcc : : i686-w64-mingw32-g++ ;" > user-config.jam
$ ./bootstrap.sh
$ ./b2 --user-config=./user-config.jam --prefix=./boost-x86 target-os=windows address-model=32 variant=release install
64-bit Compilation (install path: ./boost-x64)
$ echo "using gcc : : x86_64-w64-mingw32-g++ ;" > user-config.jam
$ ./bootstrap.sh
$ ./b2 --user-config=./user-config.jam --prefix=./boost-x64 target-os=windows address-model=64 variant=release install
I had some difficulty with this too, but it seems to be working for me now. To be clear, I'm cross compiling on Linux for Windows.
in user-config.jam:
using gcc : mingw32 : i686-w64-mingw32-g++ ;
Note that the second term "mingw32" is an arbitrary "version" tag. The toolset flag combines the compiler name and the version name w/ a dash. So, in my case, gcc-mingw32. The third term is what actually gets invoked ("i686-w64-mingw32-g++"). Obviously your version of mingw's compiler may have a different name.
Here is how I invoked bjam:
./b2 toolset=gcc-mingw32 target-os=windows threadapi=win32 --build-type=complete --prefix=/usr/x86_64-w64-mingw32/local --layout=tagged --without-python -sNO_BZIP2=1 -sNO_ZLIB=1
I got all the interesting flags from Congelli501's answer. But didn't bother with the directory of links approach.
This is the commands I use. I have tested them for boost 1.46 and 1.49.
To begin, create links to the compiler inside /usr/i686-w64-mingw32/bin. You can run this script :
#!/bin/bash
binDir="/usr/bin"
destDir="/usr/i686-w64-mingw32/bin"
cd "$binDir"
mkdir -p "$destDir"
for name in $(ls i686-w64-mingw32*); do
newName=$(echo "$name" | sed -e "s/i686-w64-mingw32-\(.\?\)/\1/")
if [ -f "$destDir/$newName" ]; then
rm "$destDir/$newName"
fi
ln -s "$binDir/$name" "$destDir/$newName"
done
Then, install bjam. On ubuntu / debian, it is included in the package "libboost1.48-dev"
apt-get install libboost1.48-dev
To finish, become root and run
env PATH=/usr/i686-w64-mingw32/bin:$PATH bjam toolset=gcc target-os=windows variant=release threading=multi threadapi=win32 link=static --prefix=/usr/i686-w64-mingw32 -j 4 --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged install
Done !
According to this it looks like you should be using the toolset=gcc-mingw. You have toolset=gcc.
As Luke already mentioned, toolset=gcc-mingw will certainly help.
Your libicu-dev is 99% sure the linux library headers, which is not for mingw. You'll either have to build it yourself or get it from someplace (could be your distribution, otherwise you'll need to build it from source)
I had same problem. Try specifying only a single build variant (i.e., add "variant=Release link=shared runtime-link=shared")