Parsing error of template_prject on Mac

62 views
Skip to first unread message

Younghwa Park

unread,
Apr 21, 2022, 6:02:31 AM4/21/22
to ProjectChrono
Hi,
I have trouble on executing template_project.
My environment is Apple M1, Chrono 7.0.3.
When I compile the example, ChMatrix.h has parse issue.
These file are locked not to modify.
Is there missing during cmake build setting, compile setting ?
Screenshot 2022-04-21 at 11.56.34.png

Radu Serban

unread,
Apr 21, 2022, 8:22:04 AM4/21/22
to ProjectChrono

I do not have access to a Mac to check this, but first question that pops to mind is: what version of Eigen do you use?

--Radu

 

From: projec...@googlegroups.com <projec...@googlegroups.com> On Behalf Of Younghwa Park
Sent: Thursday, April 21, 2022 12:03 PM
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Parsing error of template_prject on Mac

 

Hi,

I have trouble on executing template_project.

My environment is Apple M1, Chrono 7.0.3.

When I compile the example, ChMatrix.h has parse issue.

These file are locked not to modify.

Is there missing during cmake build setting, compile setting ?

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/8dbe157e-3a8c-4841-a8e9-0d0d381df7e3n%40googlegroups.com.

Younghwa Park

unread,
Apr 21, 2022, 9:39:28 AM4/21/22
to ProjectChrono

The version is Eigen 3.4.0_1 using brew. 
Demo file are working without problem. 

dr.ratz...@gmail.com

unread,
Apr 24, 2022, 11:12:27 AM4/24/22
to ProjectChrono
Hi Younghwa and Radu,

I am using a M1 Mac to and ran into the same problems. The eigen-related errors ca be avoided, if we provide a search path for it and for irrlicht like:
rm -rf build
cmake -S template_project -B build \
-DChrono_DIR:PATH="$HOME/Soft/Entwicklung/Chrono8/build-chrono/cmake" \
-DCMAKE_CXX_FLAGS:STRING="--std=c++11 -I/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -I/opt/homebrew/include/irrlicht"
cmake --build build

This will take us to the next error: 

-- Configuring done

-- Generating done

-- Build files have been written to: /Volumes/Ramdisk/build

[ 50%] Building CXX object CMakeFiles/myexe.dir/my_example.cpp.o

/Volumes/Ramdisk/template_project/my_example.cpp:20:10: fatal error: 'chrono/assets/ChColorAsset.h' file not found

#include "chrono/assets/ChColorAsset.h"

         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.

That means, the example code has to be change to the new asset system.

dr.ratz...@gmail.com

unread,
Apr 24, 2022, 11:48:21 AM4/24/22
to ProjectChrono
Just another problem: the linker command is malconfigured. I replaced the source file with chrono_IRR_assets.cpp and expected to build the app, but the linker command fails:

[2/2] Linking CXX executable myexe.app/Contents/MacOS/myexe

FAILED: myexe.app/Contents/MacOS/myexe 

: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --std=c++11 -I/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -I/opt/homebrew/include/irrlicht -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -framework Cocoa -framework OpenGL -framework IOKit   -framework Cocoa OpenGL IOKit -L/Users/rainerge/Soft/Entwicklung/Chrono8/build-chrono/lib CMakeFiles/myexe.dir/my_example.cpp.o -o myexe.app/Contents/MacOS/myexe  /opt/homebrew/lib/libomp.dylib  /opt/homebrew/lib/libIrrlicht.dylib && :

clang: error: no such file or directory: 'OpenGL'

clang: error: no such file or directory: 'IOKit'

ninja: build stopped: subcommand failed. (yes I changed to cmake -G Ninja)


Radu Serban

unread,
Apr 24, 2022, 12:20:27 PM4/24/22
to dr.ratzelbrumm, ProjectChrono

Hi Rainer,

 

I just made some changes to the CMake project configuration script which may or may not fix this issue.

Since you are using the code from the ‘develop’ branch, could you please pull the latest, reconfigure Chrono (so a new ChronoConfig.cmake is generated) and test again building the template project?

 

Thanks,
--Radu

Image removed by sender.

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/8dbe157e-3a8c-4841-a8e9-0d0d381df7e3n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages