Coder Social home page Coder Social logo

Comments (9)

john-j-mclaughlin avatar john-j-mclaughlin commented on May 19, 2024 4

-ansi
In C mode, this is equivalent to -std=c89. In C++ mode, it is equivalent to -std=c++98.

std::shared_ptr was added in C++11

from drake.

avalenzu avatar avalenzu commented on May 19, 2024 1

std::shared_ptr should be in <memory>, which is included in Model.h.

This compiled fine on my machine until I updated the cmake submodule - after that I get the same error you show above

from drake.

RussTedrake avatar RussTedrake commented on May 19, 2024

a little more info:

russt@ubuntu:~/locomotion/drake-distro/drake$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 

from drake.

RussTedrake avatar RussTedrake commented on May 19, 2024

that's good - at least it's reproducible

On Apr 12, 2014, at 10:00 AM, Andres Valenzuela [email protected] wrote:

std::shared_ptr should be in , which is included in Model.h.

This compiled fine on my machine until I updated the cmake submodule - after that I get the same error you show above


Reply to this email directly or view it on GitHub.

from drake.

avalenzu avatar avalenzu commented on May 19, 2024

This error seems to appear in RobotLocomotion/cmake@6c27268. Not sure why that would change what standard library classes are available. Here are the compile commands that work and don't work:

THIS WORKS
[ 61%] Building CXX object systems/plants/CMakeFiles/HandCmex.dir/HandCmex.cpp.o
cd /home/avalenzu/drc/software/drake/pod-build/systems/plants && /usr/lib/ccache/c++   -DHandCmex_EXPORTS -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized  -Wreturn-type -Wuninitialized -Wunused-variable -std=c++0x -O3 -DNDEBUG -fPIC -I/home/avalenzu/drc/software/drake/pod-build/include -I/home/avalenzu/drc/software/build/include -I/home/avalenzu/drc/software/drake/pod-build/lcmgen -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/avalenzu/drc/software/build/include/eigen3 -I/usr/local/MATLAB/R2013b/extern/include -I/usr/local/MATLAB/R2013b/simulink/include -I/home/avalenzu/drc/software/drake/util -I/home/avalenzu/drc/software/drake/systems/plants/tinyxml -I/home/avalenzu/drc/software/build/include/snopt    -DMATLAB_MEX_FILE -o CMakeFiles/HandCmex.dir/HandCmex.cpp.o -c /home/avalenzu/drc/software/drake/systems/plants/HandCmex.cpp

THIS DOESN'T
[ 61%] Building CXX object systems/plants/CMakeFiles/HandCmex.dir/HandCmex.cpp.o
cd /home/avalenzu/drc/software/drake/pod-build/systems/plants && /usr/lib/ccache/c++   -DHandCmex_EXPORTS -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized  -Wreturn-type -Wuninitialized -Wunused-variable -std=c++0x -O3 -DNDEBUG -fPIC -I/home/avalenzu/drc/software/drake/pod-build/include -I/home/avalenzu/drc/software/build/include -I/home/avalenzu/drc/software/drake/pod-build/lcmgen -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/avalenzu/drc/software/build/include/eigen3 -I/usr/local/MATLAB/R2013b/extern/include -I/usr/local/MATLAB/R2013b/simulink/include -I/home/avalenzu/drc/software/drake/util -I/home/avalenzu/drc/software/drake/systems/plants/tinyxml -I/home/avalenzu/drc/software/build/include/snopt    -DMATLAB_MEX_FILE  -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread   -DMX_COMPAT_32 -o CMakeFiles/HandCmex.dir/HandCmex.cpp.o -c /home/avalenzu/drc/software/drake/systems/plants/HandCmex.cpp

The difference is that the latter contains the following flags:

-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread   -DMX_COMPAT_32

If I update the cmake submodule, run make, let the build fail, and then manually enter the compile command without those flags, the file compiles.

Hope that helps!

from drake.

RussTedrake avatar RussTedrake commented on May 19, 2024

can you figure out which of the flags is causing the problem? maybe -ansi?

On Apr 12, 2014, at 10:29 AM, Andres Valenzuela [email protected] wrote:

This error seems to appear in RobotLocomotion/cmake@6c27268. Not sure why that would change what standard library classes are available. Here are the compile commands that work and don't work:

THIS WORKS
[ 61%] Building CXX object systems/plants/CMakeFiles/HandCmex.dir/HandCmex.cpp.o
cd /home/avalenzu/drc/software/drake/pod-build/systems/plants && /usr/lib/ccache/c++ -DHandCmex_EXPORTS -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized -Wunused-variable -std=c++0x -O3 -DNDEBUG -fPIC -I/home/avalenzu/drc/software/drake/pod-build/include -I/home/avalenzu/drc/software/build/include -I/home/avalenzu/drc/software/drake/pod-build/lcmgen -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/avalenzu/drc/software/build/include/eigen3 -I/usr/local/MATLAB/R2013b/extern/include -I/usr/local/MATLAB/R2013b/simulink/include -I/home/avalenzu/drc/software/drake/util -I/home/avalenzu/drc/software/drake/systems/plants/tinyxml -I/home/avalenzu/drc/software/build/include/snopt -DMATLAB_MEX_FILE -o CMakeFiles/HandCmex.dir/HandCmex.cpp.o -c /home/avalenzu/drc/software/drake/systems/plants/HandCmex.cpp

THIS DOESN'T
[ 61%] Building CXX object systems/plants/CMakeFiles/HandCmex.dir/HandCmex.cpp.o
cd /home/avalenzu/drc/software/drake/pod-build/systems/plants && /usr/lib/ccache/c++ -DHandCmex_EXPORTS -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized -Wreturn-type -Wuninitialized -Wunused-variable -std=c++0x -O3 -DNDEBUG -fPIC -I/home/avalenzu/drc/software/drake/pod-build/include -I/home/avalenzu/drc/software/build/include -I/home/avalenzu/drc/software/drake/pod-build/lcmgen -I/usr/local/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/avalenzu/drc/software/build/include/eigen3 -I/usr/local/MATLAB/R2013b/extern/include -I/usr/local/MATLAB/R2013b/simulink/include -I/home/avalenzu/drc/software/drake/util -I/home/avalenzu/drc/software/drake/systems/plants/tinyxml -I/home/avalenzu/drc/software/build/include/snopt -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -o CMakeFiles/HandCmex.dir/HandCmex.cpp.o -c /home/avalenzu/drc/software/drake/systems/plants/HandCmex.cpp
The difference is that the latter contains the following flags:

-ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32
If I update the cmake submodule, run make, let the build fail, and then manually enter the compile command without those flags, the file compiles.

Hope that helps!


Reply to this email directly or view it on GitHub.

from drake.

avalenzu avatar avalenzu commented on May 19, 2024

Good call. Without -ansi it compiles, with -ansi it doesn't.

from drake.

RussTedrake avatar RussTedrake commented on May 19, 2024

Ok. I will search for and remove the ANSI flag if it appears and print a warning. Not ideal, but seems necessary.

  • Russ

On Apr 12, 2014, at 11:09 AM, Andres Valenzuela [email protected] wrote:

Good call. Without -ansi it compiles, with -ansi it doesn't.


Reply to this email directly or view it on GitHub.

from drake.

avalenzu avatar avalenzu commented on May 19, 2024

This was resolved by RobotLocomotion/cmake@1a37c48

from drake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.