RobotLocomotion / drake

Model-based design and verification for robotics.
https://drake.mit.edu
Other
3.25k stars 1.25k forks source link

MATLAB R2014a mex -v behavior breaks cmake scripts #53

Closed RussTedrake closed 10 years ago

RussTedrake commented 10 years ago

Hello Russ,

I have a problem during the getting started/installation process of drake on my mac book retina running mavericks 10.9.2 and matlab 2014a, I hope you can help me with. In short:

running ‘make' in the 'drake-distro' folder compiles fine until ‘drake’ itself has to be compiled - this is the console error output for the drake portion:


-- drake

BUILD_PREFIX: /Users/rkk/drake-distro/build

CMake Error at cmake/mex.cmake:11 (string): string sub-command STRIP requires two arguments. Call Stack (most recent call first): cmake/mex.cmake:56 (get_mex_option) cmake/mex.cmake:199 (mex_setup) CMakeLists.txt:38 (include)

-- compiler1 version string:

-- compiler2 version string: 4.2.1 CMake Error at cmake/mex.cmake:203 (message): Your cmake C compiler is: /usr/bin/cc but your mex options use: . Consider rerunning 'mex -setup' in Matlab. Call Stack (most recent call first): CMakeLists.txt:38 (include)

-- Configuring incomplete, errors occurred! See also "/Users/rkk/drake-distro/drake/pod-build/CMakeFiles/CMakeOutput.log". make[2]: * [configure] Error 1 make[1]: * [pod-build/Makefile] Error 2 make: *\ [all] Error 2

——

I ran 'mex -setup' in Matlab, also for C++ and FORTRAN, but it does not fix the problem,.

In long, these are the steps I did before: I followed the guide on: https://github.com/RobotLocomotion/drake/wiki/Installation-and-Quickstart

alright I moved on, I am using bash, so my '~/.profile' looks like this: export MATLAB_JAVA=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home export PKG_CONFIG_PATH=:/opt/X11/lib/pkgconfig:/opt/X11/lib/pkgconfig:/opt/X11/lib/pkgconfig

I added the second line is according to your guide. The first line is needed so that my matlab R2014a displays correctly on my retina mac book (using newer JRE - mine is version 7 update 51). Matlab uses an older builtin java version, which does not support the retina resolution.

My matlab version is:

MATLAB Version: 8.3.0.532 (R2014a) MATLAB License Number: 650667 Operating System: Mac OS X Version: 10.9.2 Build: 13C64

Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode

MATLAB Version 8.3 (R2014a) Simulink Version 8.3 (R2014a) Aerospace Blockset Version 3.13 (R2014a) Aerospace Toolbox Version 2.13 (R2014a) Bioinformatics Toolbox Version 4.4 (R2014a) Communications System Toolbox Version 5.6 (R2014a) Computer Vision System Toolbox Version 6.0 (R2014a) Control System Toolbox Version 9.7 (R2014a) Curve Fitting Toolbox Version 3.4.1 (R2014a) DSP System Toolbox Version 8.6 (R2014a) Database Toolbox Version 5.1 (R2014a) Datafeed Toolbox Version 4.7 (R2014a) Econometrics Toolbox Version 3.0 (R2014a) Embedded Coder Version 6.6 (R2014a) Filter Design HDL Coder Version 2.9.5 (R2014a) Financial Instruments Toolbox Version 1.3 (R2014a) Financial Toolbox Version 5.3 (R2014a) Fixed-Point Designer Version 4.2 (R2014a) Fuzzy Logic Toolbox Version 2.2.19 (R2014a) Global Optimization Toolbox Version 3.2.5 (R2014a) Image Acquisition Toolbox Version 4.7 (R2014a) Image Processing Toolbox Version 9.0 (R2014a) Instrument Control Toolbox Version 3.5 (R2014a) LTE System Toolbox Version 1.1 (R2014a) MATLAB Builder JA Version 2.3.1 (R2014a) MATLAB Coder Version 2.6 (R2014a) MATLAB Compiler Version 5.1 (R2014a) MATLAB Report Generator Version 3.16 (R2014a) Mapping Toolbox Version 4.0.1 (R2014a) Model Predictive Control Toolbox Version 4.2 (R2014a) Neural Network Toolbox Version 8.2 (R2014a) Optimization Toolbox Version 7.0 (R2014a) Parallel Computing Toolbox Version 6.4 (R2014a) Partial Differential Equation Toolbox Version 1.4 (R2014a) RF Toolbox Version 2.14 (R2014a) Robust Control Toolbox Version 5.1 (R2014a) Signal Processing Toolbox Version 6.21 (R2014a) SimBiology Version 5.0 (R2014a) SimDriveline Version 2.6 (R2014a) SimElectronics Version 2.5 (R2014a) SimEvents Version 4.3.2 (R2014a) SimHydraulics Version 1.14 (R2014a) SimMechanics Version 4.4 (R2014a) SimPowerSystems Version 6.1 (R2014a) Simscape Version 3.11 (R2014a) Simulink 3D Animation Version 7.1 (R2014a) Simulink Coder Version 8.6 (R2014a) Simulink Control Design Version 4.0 (R2014a) Simulink Design Optimization Version 2.5 (R2014a) Simulink Report Generator Version 3.16 (R2014a) Simulink Verification and Validation Version 3.7 (R2014a) Stateflow Version 8.3 (R2014a) Statistics Toolbox Version 9.0 (R2014a) Symbolic Math Toolbox Version 6.0 (R2014a) System Identification Toolbox Version 9.0 (R2014a) Wavelet Toolbox Version 4.13 (R2014a)

Thank you for your help,

Is there a bug tracking page I should add this request to?

Bye Robert Katzschmann

RussTedrake commented 10 years ago

The cmake scripts are not finding your mex compiler. Can you run mex -v at the linux command line and show me the output?

tarquasso commented 10 years ago

30-6-159:drake-distro rkk$ mex -v pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013) kpathsea version 6.1.1 Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled with libpng 1.6.1; using libpng 1.6.1 Compiled with zlib 1.2.7; using zlib 1.2.7 Compiled with xpdf version 3.03

-> hmm, seems like my pdfTeX took the mex command, how can I get that fixed?

RussTedrake commented 10 years ago

yes. great. that's the problem.

i recently updated the cmake scripts to try to help with this, can we make sure that you're using the most up-to-date? can you try the following?

cd drake-distro/drake/cmake
git checkout master
git pull

if it pulls something new down, then

cd drake-distro/drake/
make configure
make

and to see if that helped?

On Mar 11, 2014, at 9:44 PM, Robert Katzschmann notifications@github.com wrote:

30-6-159:drake-distro rkk$ mex -v pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013) kpathsea version 6.1.1 Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). Compiled with libpng 1.6.1; using libpng 1.6.1 Compiled with zlib 1.2.7; using zlib 1.2.7 Compiled with xpdf version 3.03

-> hmm, seems like my pdfTeX took the mex command, how can I get that fixed?

— Reply to this email directly or view it on GitHub.

tarquasso commented 10 years ago

I tried it, but it did not work out, I think the problem is my cmake folder is completely empty... See below:

30-6-159:~ rkk$ cd drake-distro/drake/cmake 30-6-159:cmake rkk$ git checkout master Previous HEAD position was e017dce... README w/ pointer to and permissions from Roy Featherstone Switched to branch 'master' Your branch is up-to-date with 'origin/master'. 30-6-159:cmake rkk$ git pull shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory fatal: Unable to read current working directory: No such file or directory 30-6-159:cmake rkk$ git pull Already up-to-date. 30-6-159:cmake rkk$ git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. 30-6-159:cmake rkk$ git pull Already up-to-date. 30-6-159:cmake rkk$ cd .. 30-6-159:drake rkk$ make configure BUILD_PREFIX: /Users/rkk/drake-distro/build CMake Error at CMakeLists.txt:7 (include): include could not find load file: cmake/pods.cmake CMake Error at CMakeLists.txt:41 (include): include could not find load file: cmake/mex.cmake CMake Error at CMakeLists.txt:47 (include): include could not find load file: cmake/lcmtypes.cmake CMake Error at CMakeLists.txt:49 (lcmtypes_build): Unknown CMake command "lcmtypes_build". -- Configuring incomplete, errors occurred! See also "/Users/rkk/drake-distro/drake/pod-build/CMakeFiles/CMakeOutput.log". make: *\ [configure] Error 1 30-6-159:cmake rkk$ ls 30-6-159:cmake rkk$

RussTedrake commented 10 years ago

Sorry. I should have realized your drake directory is old, too. (before the cmake was pulled to a submodule).

cd drake-distro/drake
git checkout master
git pull
git submodule init
git submodule sync
git submodule update

that should put something non-empty in your cmake folder.

On Mar 11, 2014, at 11:27 PM, Robert Katzschmann notifications@github.com wrote:

I tried it, but it did not work out, I think the problem is my cmake folder is completely empty... See below:

30-6-159:~ rkk$ cd drake-distro/drake/cmake 30-6-159:cmake rkk$ git checkout master Previous HEAD position was e017dce... README w/ pointer to and permissions from Roy Featherstone Switched to branch 'master' Your branch is up-to-date with 'origin/master'. 30-6-159:cmake rkk$ git pull shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory fatal: Unable to read current working directory: No such file or directory 30-6-159:cmake rkk$ git pull Already up-to-date. 30-6-159:cmake rkk$ git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. 30-6-159:cmake rkk$ git pull Already up-to-date. 30-6-159:cmake rkk$ cd .. 30-6-159:drake rkk$ make configure BUILD_PREFIX: /Users/rkk/drake-distro/build CMake Error at CMakeLists.txt:7 (include): include could not find load file: cmake/pods.cmake CMake Error at CMakeLists.txt:41 (include): include could not find load file: cmake/mex.cmake CMake Error at CMakeLists.txt:47 (include): include could not find load file: cmake/lcmtypes.cmake CMake Error at CMakeLists.txt:49 (lcmtypes_build): Unknown CMake command "lcmtypes_build". -- Configuring incomplete, errors occurred! See also "/Users/rkk/drake-distro/drake/pod-build/CMakeFiles/CMakeOutput.log". make: *\ [configure] Error 1 30-6-159:cmake rkk$ ls 30-6-159:cmake rkk$

— Reply to this email directly or view it on GitHub.

tarquasso commented 10 years ago

everything worked until running 'make configure', which resulted in an error. it still can not find my mex or my mex options:

30-6-159:drake rkk$ git submodule init Submodule 'cmake' (https://github.com/RobotLocomotion/cmake.git) registered for path 'cmake' Submodule 'doc/wiki' (https://github.com/RobotLocomotion/drake.wiki.git) registered for path 'doc/wiki' 30-6-159:drake rkk$ git submodule sync Synchronizing submodule url for 'cmake' Synchronizing submodule url for 'doc/wiki' 30-6-159:drake rkk$ git submodule update Cloning into 'cmake'... remote: Reusing existing pack: 264, done. remote: Counting objects: 5, done. remote: Compressing objects: 100% (5/5), done. remote: Total 269 (delta 1), reused 0 (delta 0) Receiving objects: 100% (269/269), 65.22 KiB | 0 bytes/s, done. Resolving deltas: 100% (163/163), done. Checking connectivity... done. Submodule path 'cmake': checked out 'c0286087086a1350458770e06e9371ac99d487e2' Cloning into 'doc/wiki'... remote: Counting objects: 1894, done. remote: Compressing objects: 100% (696/696), done. remote: Total 1894 (delta 1075), reused 1757 (delta 1004) Receiving objects: 100% (1894/1894), 8.01 MiB | 5.61 MiB/s, done. Resolving deltas: 100% (1075/1075), done. Checking connectivity... done. Submodule path 'doc/wiki': checked out '35547fab2e01b4ae0fc40ab755948357114efc47' 30-6-159:drake rkk$ cd cmake/ 30-6-159:cmake rkk$ cd .. 30-6-159:drake rkk$ make configure

BUILD_PREFIX: /Users/rkk/drake-distro/build

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CC using mex -v Call Stack (most recent call first): cmake/mex.cmake:96 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:98 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CDEBUGFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:99 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_COPTIMFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:100 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CLIBS using mex -v Call Stack (most recent call first): cmake/mex.cmake:101 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CXX using mex -v Call Stack (most recent call first): cmake/mex.cmake:104 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CXXDEBUGFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:105 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CXXOPTIMFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:106 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_CXXLIBS using mex -v Call Stack (most recent call first): cmake/mex.cmake:107 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_LD using mex -v Call Stack (most recent call first): cmake/mex.cmake:118 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_LDFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:119 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_LDDEBUGFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:120 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_LDOPTIMFLAGS using mex -v Call Stack (most recent call first): cmake/mex.cmake:121 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Warning at cmake/mex.cmake:18 (message): Could not find MEX_LDEXTENSION using mex -v Call Stack (most recent call first): cmake/mex.cmake:122 (get_mex_option) cmake/mex.cmake:269 (mex_setup) CMakeLists.txt:41 (include)

CMake Error at cmake/mex.cmake:256 (get_compiler_version): get_compiler_version Function invoked with incorrect arguments for function named: get_compiler_version Call Stack (most recent call first): cmake/mex.cmake:271 (compare_compilers) CMakeLists.txt:41 (include)

CMake Error at cmake/mex.cmake:273 (message): Your cmake C compiler is: "/usr/bin/cc" but your mex options use: "". You must use the same compilers. You can either:

a) reconfigure the mex compiler by running 'mex -setup' in  MATLAB, or
b) Set the default compiler for cmake by setting the CC environment variable in your terminal.

Call Stack (most recent call first): CMakeLists.txt:41 (include)

-- Configuring incomplete, errors occurred! See also "/Users/rkk/drake-distro/drake/pod-build/CMakeFiles/CMakeOutput.log". make: *\ [configure] Error 1

RussTedrake commented 10 years ago

Say down with Robert yesterday. It appears that matlab has changed the mex command line behavior with 2014a (it believe it was not changed in the pre-release candidate that I had installed). Now mex -v returns "no input files" error without reporting any variables. And mex -v dummy.cpp returns the parameters, but with a different delimiter. I will have to update the parser (after downloading and installing the latest release).

Robert's system is working fine now with 2013a, which he also had installed.