Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build on MacOS Big Slur fails. #144

Closed
luto65 opened this issue Jun 12, 2024 · 6 comments
Closed

build on MacOS Big Slur fails. #144

luto65 opened this issue Jun 12, 2024 · 6 comments

Comments

@luto65
Copy link

luto65 commented Jun 12, 2024

dear all,
cmake --build build -j4
[ 11%] Building C object CMakeFiles/sim-base.dir/lv_drivers/indev/mouse.c.o
In file included from /Users/bingo/InfiniSim/lv_drivers/indev/keyboard.c:9:
/Users/bingo/InfiniSim/lv_drivers/indev/keyboard.h:36:10: fatal error: 'SDL2/SDL.h' file not found
#include MONITOR_SDL_INCLUDE_PATH

however SDL2 are properly installed and the following test works fine
g++ main.cpp -o main -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks -framework SDL2

#include
#include <SDL.h>
int main(int argc, char **argv){
if (SDL_Init(SDL_INIT_EVERYTHING) != 0){
std::cout << "SDL_Init Error: " << SDL_GetError() << std::endl;
return 1;
}
SDL_Quit();
return 0;
}

Thanks.

@luto65
Copy link
Author

luto65 commented Jun 12, 2024

short update:

  1. use Xcode instead of unix
    cmake -S . -B build -G Xcode
  2. append the following line to the clang compilation
    -I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks

however, i have not yet found out how to append that to all compilations...

@NeroBurner
Copy link
Collaborator

you could try with https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html

cmake -S . -B build -G Xcode -DCMAKE_CXX_FLAGS="-I/Library/Frameworks/SDL2.framework/Headers -F/Library/Frameworks"

@luto65
Copy link
Author

luto65 commented Jun 14, 2024

thankyou @NeroBurner now i get another error:

Undefined symbols for architecture x86_64:
"__lv_anim_ll", referenced from:
__lv_anim_core_init in libsim-base.a(lv_anim.o)
_anim_task in libsim-base.a(lv_anim.o)
_anim_mark_list_change in libsim-base.a(lv_anim.o)
_lv_anim_start in libsim-base.a(lv_anim.o)
_lv_anim_del in libsim-base.a(lv_anim.o)
_lv_anim_del_all in libsim-base.a(lv_anim.o)
_lv_anim_get in libsim-base.a(lv_anim.o)
...

@NeroBurner
Copy link
Collaborator

looks to me like not-exported symbols. Does mac need to mark headers as exported like MSVC does?

maybe #25 helps?

@NeroBurner
Copy link
Collaborator

This one has the same problem: #127

is it OK to close this one as duplicate?

@luto65
Copy link
Author

luto65 commented Jun 16, 2024

dear all, i close this build since at the end the solution has been to

  1. download and install https://download.virtualbox.org/virtualbox/7.0.18/VirtualBox-7.0.18-162988-OSX.dmg
  2. download OpenSuse tumbleweed https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-DVD-x86_64-Current.iso
  3. create a new VM using VirtualBox and OpenSuse Tumbleweed https://www.youtube.com/watch?v=HgTSK48hlds
  4. start the new VM and then follow the installation steps as described therein.

@luto65 luto65 closed this as completed Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants