I'm on Ubuntu 23.10 VM - trying to compile XMOS (cmake followed by xmake)
Here are the errors (multiple definition of main()) getting thrown - any idea?
~/XMOS/sw_usb_audio/app_usb_aud_xk_316_mc$ cmake -G "Unix Makefiles" -B build
~/XMOS/sw_usb_audio/app_usb_aud_xk_316_mc$ xmake all
<snip>
Creating app_usb_aud_xk_316_mc_1SMi2o2xxxxxx.xe
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'main'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'main.nstackwords'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'main.maxcores'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'main.maxtimers'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'main.maxchanends'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'info_compiler'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'info_platform'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'info_arch'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'info_language_standard_default'
CMakeCCompilerId.c: Error: first defined here
CMakeCXXCompilerId.cpp: Error: Multiple definition of 'info_language_extensions_default'
CMakeCCompilerId.c: Error: first defined here
xmake[2]: *** [bin/1SMi2o2xxxxxx/app_usb_aud_xk_316_mc_1SMi2o2xxxxxx.xe] Error 1
xmake[1]: *** [bin/1SMi2o2xxxxxx/app_usb_aud_xk_316_mc_1SMi2o2xxxxxx.xe] Error 2
xmake: *** [1SMi2o2xxxxxx.all] Error 2
XMOS sw_usb_audio build failure on Linux Topic is solved
-
- Member
- Posts: 14
- Joined: Fri Nov 15, 2024 2:40 am
-
- Member++
- Posts: 26
- Joined: Tue Jul 16, 2024 9:52 am
- Location: Bristol, UK
After running the cmake command, please run xmake inside the build directory.
Our CMake-based build system (XCommon CMake) is just starting to be deployed and used in applications, so we are continuing to include the legacy Makefile in the applications for existing users who aren't in a position to switch to XCommon CMake.
Our CMake-based build system (XCommon CMake) is just starting to be deployed and used in applications, so we are continuing to include the legacy Makefile in the applications for existing users who aren't in a position to switch to XCommon CMake.
XMOS, Senior Software Engineer
-
- Member
- Posts: 14
- Joined: Fri Nov 15, 2024 2:40 am
That was it , thank you Daniel!