Drake build from source stubgen failed - cmake

I'm building drake from source, specifically this branch of Russ' fork:
https://github.com/RussTedrake/drake
everything worked without issue until the last command make -j
where I get the following output:
[ 12%] Performing build step for 'drake_cxx_python'
INFO: Analyzed target //:install (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /Users/chewchiashaoyuan/Documents/Software/drake/bindings/pydrake/BUILD.bazel:780:22: GenerateMypyStubs bindings/pydrake/pydrake/__init__.pyi failed: (Exit 1): stubgen failed: error executing command bazel-out/darwin-opt/bin/bindings/pydrake/stubgen --quiet '--package=pydrake' '--output=bazel-out/darwin-opt/bin/bindings/pydrake'
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Matplotlib created a temporary config/cache directory at /var/folders/sl/37m0k__51_3_5c5j02w201r40000gn/T/matplotlib-8mr5qkfg because the default path (/Users/chewchiashaoyuan/.matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
Critical error during semantic analysis: /usr/local/lib/python3.10/site-packages/pydrake/symbolic.pyi:203: error: invalid syntax
Target //:install failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /Users/chewchiashaoyuan/Documents/Software/drake/BUILD.bazel:63:8 Middleman _middlemen/install-runfiles failed: (Exit 1): stubgen failed: error executing command bazel-out/darwin-opt/bin/bindings/pydrake/stubgen --quiet '--package=pydrake' '--output=bazel-out/darwin-opt/bin/bindings/pydrake'
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 9.617s, Critical Path: 9.33s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
make[2]: *** [drake_cxx_python-prefix/src/drake_cxx_python-stamp/drake_cxx_python-build] Error 1
make[1]: *** [CMakeFiles/drake_cxx_python.dir/all] Error 2
make: *** [all] Error 2
My operating system is:
macOS Monterey Version 12.6
The full make -j -d output is here
I referenced https://drake.mit.edu/from_source.html, https://drake.mit.edu/bazel.html#snopt and https://github.com/RobotLocomotion/drake/issues/12175
I did the following:
git clone https://github.com/RussTedrake/drake
cd drake
git checkout kin_traj_opt2
./setup/mac/install_prereqs.sh
cd ..
mkdir drake-build
cd drake-build
cmake -DWITH_ROBOTLOCOMOTION_SNOPT=ON ../drake
make -j
Fixes attempted:
tried deleting the whole drake-build directory and doing the whole process from scratch, got the same errors

One filename from the error message stands out: /usr/local/lib/python3.10/site-packages/pydrake/symbolic.pyi. It looks like you have sudo pip install drake installed into a system-wide directory. That is likely interfering with the from-source build of Drake and will need to be removed.

Related

Unable to compile Riak on Raspberry Pi 3

currenty I'm trying to install Riak on the Raspberry Pi 3 for testing purposes. I used the following instruction from basho:
http://docs.basho.com/riak/kv/2.2.2/setup/installing/source/
I'm having problems compiling it from source. I tried to compile it on Raspbian Jessie and then switched to Ubuntu Server 16.04. Both times with the same result. It is not compiling and aborts at a certain point. I don't know what causes the problem since it only says: recipe for target 'util/perf_count.o' failed. Searching Google and the mailing list from basho weren't successful.
The version of gcc is gcc (Raspbian 4.9.2-10) 4.9.2. The version of Erlang is Erlang R16B02_basho8 (erts-5.10.3)
The commands i used are the following:
Installing Erlang:
wget http://s3.amazonaws.com/downloads.basho.com/erlang/otp_src_R16B02basho10.tar.gz
tar zxvf otp_src_R16B02-basho10.tar.gz
cd OTP_R16B02_basho10
./otp_build autoconf
./configure && make && sudo make install
Installing Riak:
wget http://s3.amazonaws.com/downloads.basho.com/riak/2.2/2.2.1/riak-2.2.1.tar.gz
tar zxvf riak-2.2.1.tar.gz
cd riak-2.2.1
make locked-deps
make rel
Any suggestions are welcome.
Output:
`./include/leveldb/atomics.h:155:15: note:
template argument deduction/substitution failed util/perf_count.cc:439:40:
note: deduced conflicting types for parameter ‘ValueT’
(‘unsigned int’ and‘int’ add_and_fetch(ptr_32, 1);`
`Makefile:190: recipe for target 'util/perf_count.o' failed
make[1]: *** [util/perf_count.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/pi/Riak/riak/deps/eleveldb/c_src/leveldb'
ERROR: Command [compile] failed!
Makefile:23: recipe for target 'compile' failed
make: *** [compile] Error 1`
After digging deeper I got some help from Basho's mailing list (many thanks).
The Link below shows the steps to solve this problem:
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2017-April/019187.html
The next link is a detailed instruction, which helps to install Riak on the Raspberry Pi 3:
http://docs.basho.com/riak/kv/2.2.2/setup/installing/source/

Can't find jemalloc while building MariaDB on Raspbian Wheezy

I have installed the list of Required tools shown on the Build Environment Setup for Linux, including JEMALLOC, on my Raspberry Pi which has Raspbian Wheezy installed, fully updated, and setup for development. I have successfully built some of the listed tools (Bison, CMake 3.7.2). I have gcc and g++ (Raspbian 4.8.2-21rpi3rpi1) 4.8.2.
When I attempt to build mariadb 10.1.22 (master branch from the github repository) using cmake . -DBUILD_CONFIG=mysql_release I get an error:
CMake Error at cmake/jemalloc.cmake:38 (MESSAGE):
jemalloc is not found
Call Stack (most recent call first):
CMakeLists.txt:343 (CHECK_JEMALLOC)
After building JEMALLOC, I installed it into /usr/local using sudo make install. I have export JEMALLOC_PATH=/usr/local in my .bashrc.
I don't understand why CHECK_JEMALLOC is failing to find the correct files. A list of the file locations is:
/usr/local/bin/jemalloc.sh
/usr/local/bin/jemalloc-config
/usr/local/include/jemalloc
/usr/local/include/jemalloc/jemalloc.h
/usr/local/lib/pkgconfig/jemalloc.pc
/usr/local/lib/libjemalloc.so
/usr/local/lib/libjemalloc_pic.a
/usr/local/lib/libjemalloc.so.2
/usr/local/lib/libjemalloc.a
/usr/local/share/doc/jemalloc
/usr/local/share/doc/jemalloc/jemalloc.html
/usr/local/share/man/man3/jemalloc.3
I can attach a link to the CMake configure log, error log, and terminal output if needed.
UPDATE
I tried using just cmake . and the configuration part worked, but the make failed with the following error:
/home/user/Downloads/mariadb/server/storage/mroonga/vendor/groonga/lib/expr.c:6816:7: note: in expansion of macro ‘GRN_PTR_POP’
GRN_PTR_POP(&keywords, keyword);
^
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.
storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/build.make:257: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o' failed
make[2]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o] Error 4
make[2]: Leaving directory '/home/user/Downloads/mariadb/server'
CMakeFiles/Makefile2:4420: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all' failed
make[1]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all] Error 2
make[1]: Leaving directory '/home/user/Downloads/mariadb/server'
Makefile:152: recipe for target 'all' failed
make: *** [all] Error 2

FASTCGI Install on Raspberry PI Error - Cannot Manually Build Package

I have searched the internet all weekend and cannot find anyone who has had a similar error. I am trying to install libapache-mod-factcgi but the package errors out and I cannot figure out why.
pi#applejacks:/tmp $ sudo apt-get source -b libapache2-mod-fastcgi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.dsc'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141.orig.tar.gz'
Skipping already downloaded file 'libapache-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1.diff.gz'
Need to get 0 B of source archives.
Skipping unpack of already unpacked source in libapache-mod-fastcgi-2.4.7~0910052141
dpkg-buildpackage: source package libapache-mod-fastcgi
dpkg-buildpackage: source version 2.4.7~0910052141-1.1+deb8u1
dpkg-buildpackage: source distribution jessie
dpkg-buildpackage: source changed by Andreas Beckmann <anbe#debian.org>
dpkg-buildpackage: host architecture armhf
dpkg-source --before-build libapache-mod-fastcgi-2.4.7~0910052141
debian/rules clean
dh_listpackages: Please specify the compatibility level in debian/compat
dh_listpackages: Compatibility levels before 5 are no longer supported (level 1 requested)
/usr/share/cdbs/1/rules/dpatch.mk:33: CDBS WARNING: dpatch.mk is deprecated since 0.4.85 - please use source format 3.0 (quilt) instead
test -x debian/rules
rmdir /tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp
rmdir: failed to remove ‘/tmp/libapache-mod-fastcgi-2.4.7~0910052141/build-tmp’: No such file or directory
/usr/share/cdbs/1/rules/buildcore.mk:46: recipe for target 'cleanbuilddir' failed
make: [cleanbuilddir] Error 1 (ignored)
dh_clean
dh_clean: Please specify the compatibility level in debian/compat
/usr/share/cdbs/1/rules/debhelper.mk:189: recipe for target 'clean' failed
make: *** [clean] Error 2
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
Build command 'cd libapache-mod-fastcgi-2.4.7~0910052141 && dpkg-buildpackage -b -uc' failed.
E: Child process failed
I'm trying to build Apache2 on RPi also. These commands got the .deb building for me:
cd libapache-mod-fastcgi-2.4.7~0910052141;
echo 10 > debian/compat;
dpkg-buildpackage -b -uc
Then cd .. to go one level up, then install the package with dpkg -i ./libapache2-mod-fastcgi_2.4.7~0910052141-1.1+deb8u1_armhf.deb

Install Qutip on Mac os x 10.10 via MacPorts

I am not sure whether i can ask this question here.
I tried to install QuTips on my mac osx 10.10. Am following these two documentation for installation Qutip and MacPorts. Now am struggle to install gcc49.
When i execute this command sudo port install py34-scipy I got the following error
Admins-iMac-2:base admin$ sudo port install py27-scipy
---> Computing dependencies for py27-scipy
The following dependencies will be installed:
gcc49
py27-numpy
swig
swig-python
Continue? [Y/n]: y
---> Building gcc49
Error: Failed to build gcc49: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py27-scipy failed
Admins-iMac-2:base admin$ sudo port install py34-numpy
---> Computing dependencies for py34-numpy
The following dependencies will be installed: gcc49
Continue? [Y/n]: y
---> Building gcc49
Error: Failed to build gcc49: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port py34-numpy failed
Admins-iMac-2:base admin$ vi /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log
Admins-iMac-2:base admin$
I go and look for main.log file. At the end of this file i got below errors
:info:build gcc/vtable-verify.o differs
:info:build make[2]: *** [compare] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build make[1]: *** [stage3-bubble] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build make: *** [bootstrap] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build'
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/work/build" && /usr/bin/make -j4 -w bootstrap
:info:build Exit code: 2
:error:build Failed to build gcc49: command execution failed
:debug:build Error code: CHILDSTATUS 2595 2
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec build"
:debug:build (procedure "portbuild::build_main" line 8)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:debug:build Registry error: gcc49 not registered as installed & active.
:debug:build invoked from within
:debug:build "registry_active $subport"
:debug:build invoked from within
:debug:build "$workername eval registry_active \$subport"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc49/gcc49/main.log for details.
Am not familiar with this. I cannot complete installation without this gcc49. Alternatively i install gcc48, but dosen't work for me. Every time it automatically tried ti install gcc49.
Anybody have any suggestion, it will be really appreciated.
I can answer my question
run sudo port clean gcc49, then try again

VxWorks 6.8 Image Project Not Compiling

I am using Wind River Workbench 3.3 and VxWorks 6.8. When using building from the command line everything works, but when I attempt to build within Workbench I get errors. In attempting to track it down, I have determined that the same problem occurs when creating a new VxWorks Image Project using our board support package and the gnu tool chain.
I created a new project and attempt to build it in the default_romCompress build spec. I get the following errors.
romInit.o: In function `delay_100us':
C:/WindRiver/vxworks-6.8/target/config/mrim/romInit.s:649: undefined reference to `romStart'
C:/WindRiver/vxworks-6.8/target/config/mrim/romInit.s:650: undefined reference to `romStart'
make.exe[1]: *** [vxWorks_romCompress] Error 1
rm ipcom_ipdomain
make.exe[1]: Leaving directory `D:/WindRiverWorkbench/Test/default_romCompress'
C:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [target_vxWorks] Error 2
Build Failed in Project 'Test' (Process Exit Value was 2): 2014-01-14 17:22:11 (Elapsed Time: 00:06)
the symbol romStart is defined in romStart.c, which is part of the project. When I attempt to compile just romStart.c I get the following output.
Build Started in Project 'Test': 2014-01-15 08:57:25
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.8
Command: make BUILD_SPEC=default_romCompress DEBUG_MODE=0 TRACE=1 default_romCompress/romStart.o
Working Directory: D:/WindRiverWorkbench/Test
make.exe[1]: Entering directory `D:/WindRiverWorkbench/Test'
make.exe[2]: Entering directory `D:/WindRiverWorkbench/Test/default_romCompress'
ccppc -c -DCPU_VARIANT=_ppc860 -g -msoft-float -mstrict-align -ansi -fno-builtin -Wall -D_VSB_CONFIG_FILE=\"C:/WindRiver/vxworks-6.8/target/lib/h/config/vsbConfig.h\" -mcpu=860 -I.. -IC:/WindRiver/vxworks-6.8/target/config/mrim -IC:/WindRiver/vxworks-6.8/target/h -IC:/WindRiver/vxworks-6.8/target/config/comps/src -IC:/WindRiver/vxworks-6.8/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.8/target/src/drv -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=sfgnu -DPRJ_BUILD -D_WRS_KERNEL -IC:/WindRiver/components/windml-5.3/h -IC:/WindRiver/components/webservices-1.7/h -IC:/WindRiver/components/webcli-4.8/target/h -IC:/WindRiver/components/opc-3.2/h -IC:/WindRiver/components/dcom-2.3/h -IC:/WindRiver/components/windml-5.3/osconfig/vxworks/src -IC:/WindRiver/components/ip_net2-6.8/osconfig/vxworks/src -IC:/WindRiver/components/windml-5.3/osconfig/vxworks/h -IC:/WindRiver/components/ip_net2-6.8/osconfig/vxworks/h -IC:/WindRiver/vxworks-6.8/target/src/hwif -IC:/WindRiver/vxworks-6.8/target/src/hwif/h #./ipcom_ipdomain -DIP_PORT_VXWORKS=68 -DINET -UCPU -DCPU=PPC860 -I. -MD -fvolatile -G8 -msdata=eabi -DROM_COMPRESS -DRAM_DATA_ADRS=0x00e00000 -DRAM_DST_ADRS=0x00010000 C:/WindRiver/vxworks-6.8/target/config/comps/src/romStart.c -o romStart.o
ccppc: #./ipcom_ipdomain: No such file or directory
make.exe[2]: *** [romStart.o] Error 1
make.exe[2]: Leaving directory `D:/WindRiverWorkbench/Test/default_romCompress'
make.exe[1]: *** [compile_romStart.o] Error 2
make.exe[1]: Leaving directory `D:/WindRiverWorkbench/Test'
C:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [default_romCompress/romStart.o] Error 2
Build Failed in Project 'Test' (Process Exit Value was 2): 2014-01-15 08:57:26 (Elapsed Time: 00:01)
However, if I attempt to compile romStart.c a second time, then it succeeds
If I again try to build the project (not clean and not rebuild), then it fails again with the following output.
Build Started in Project 'Test': 2014-01-15 08:58:36
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.8
Command: make BUILD_SPEC=default_romCompress DEBUG_MODE=0 TRACE=1
Working Directory: D:/WindRiverWorkbench/Test
building default vxWorks image of D:/WindRiverWorkbench/Test
make.exe[1]: Entering directory `D:/WindRiverWorkbench/Test/default_romCompress'
cp vxWorks vxWorks.o
true vxWorks.o
objcopyppc -O binary --binary-without-bss vxWorks.o tmp.bin
VX_CPU_FAMILY=ppc C:/WindRiver/vxworks-6.8/host/x86-win32/bin/deflate < tmp.bin > tmp.Z
Deflation: 53.98%
VX_CPU_FAMILY=ppc C:/WindRiver/vxworks-6.8/host/x86-win32/bin/binToAsm tmp.Z > vxWorks.Z.s
ccppc -c -DCPU_VARIANT=_ppc860 -g -msoft-float -mstrict-align -ansi -fno-builtin -xassembler-with-cpp -D_VSB_CONFIG_FILE=\"C:/WindRiver/vxworks-6.8/target/lib/h/config/vsbConfig.h\" -mcpu=860 -I.. -IC:/WindRiver/vxworks-6.8/target/config/mrim -IC:/WindRiver/vxworks-6.8/target/h -IC:/WindRiver/vxworks-6.8/target/config/comps/src -IC:/WindRiver/vxworks-6.8/target/h/wrn/coreip -IC:/WindRiver/vxworks-6.8/target/src/drv -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=sfgnu -DPRJ_BUILD -D_WRS_KERNEL -IC:/WindRiver/components/windml-5.3/h -IC:/WindRiver/components/webservices-1.7/h -IC:/WindRiver/components/webcli-4.8/target/h -IC:/WindRiver/components/opc-3.2/h -IC:/WindRiver/components/dcom-2.3/h -IC:/WindRiver/components/windml-5.3/osconfig/vxworks/src -IC:/WindRiver/components/ip_net2-6.8/osconfig/vxworks/src -IC:/WindRiver/components/windml-5.3/osconfig/vxworks/h -IC:/WindRiver/components/ip_net2-6.8/osconfig/vxworks/h -IC:/WindRiver/vxworks-6.8/target/src/hwif -IC:/WindRiver/vxworks-6.8/target/src/hwif/h #./ipcom_ipdomain -DIP_PORT_VXWORKS=68 -DINET -UCPU -DCPU=PPC860 -I. -MD vxWorks.Z.s -o vxWorks.Z.o
ccppc: #./ipcom_ipdomain: No such file or directory
make.exe[1]: *** [vxWorks_romCompress] Error 1
make.exe[1]: Leaving directory `D:/WindRiverWorkbench/Test/default_romCompress'
C:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [target_vxWorks] Error 2
Build Failed in Project 'Test' (Process Exit Value was 2): 2014-01-15 08:58:37 (Elapsed Time: 00:01)
Can anyone suggest how I might go about fixing these problems?