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

Not working on OS X (High Sierra 10.13.6, Eclipse Oxygen) #20

Closed
BrendanSimon opened this issue Aug 13, 2018 · 6 comments
Closed

Not working on OS X (High Sierra 10.13.6, Eclipse Oxygen) #20

BrendanSimon opened this issue Aug 13, 2018 · 6 comments

Comments

@BrendanSimon
Copy link

I've cloned pc_simulator, installed sdl with brew, imported the project into Eclipse Oxygen, and click the build icon.
main.c builds ok, but the link fails.

It seems that objects or libraries are missing.

I tried running make from the root directly, which then built the demo (which doesn't run). I tried adding those objects to the pc_simulator link and it did compile, but again didn't run.

How can I get this running on OS X?

make all 
Building file: ../main.c
Invoking: Cross GCC Compiler
gcc -I"/Users/brendan/Sandbox/littlevgl/pc_simulator" -O0 -Og -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c"
Finished building: ../main.c
 
Building target: pc_simulator
Invoking: Cross GCC Linker
gcc  -o "pc_simulator"  ./main.o   
Undefined symbols for architecture x86_64:
  "_SDL_CreateThread", referenced from:
      _hal_init in main.o
  "_SDL_Delay", referenced from:
      _tick_thread in main.o
  "_demo_create", referenced from:
      _main in main.o
  "_lv_disp_drv_init", referenced from:
      _hal_init in main.o
  "_lv_disp_drv_register", referenced from:
      _hal_init in main.o
  "_lv_indev_drv_init", referenced from:
      _hal_init in main.o
  "_lv_indev_drv_register", referenced from:
      _hal_init in main.o
  "_lv_init", referenced from:
      _main in main.o
  "_lv_task_handler", referenced from:
      _main in main.o
  "_lv_tick_inc", referenced from:
      _tick_thread in main.o
  "_monitor_fill", referenced from:
      _hal_init in main.o
  "_monitor_flush", referenced from:
      _hal_init in main.o
  "_monitor_init", referenced from:
      _hal_init in main.o
  "_monitor_map", referenced from:
      _hal_init in main.o
  "_mouse_init", referenced from:
      _hal_init in main.o
  "_mouse_read", referenced from:
      _hal_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [pc_simulator] Error 1
@kisvegabor
Copy link
Member

Hi,

I'm don't use OSX but from "Undefined symbols for architecture x86_64:" it seems you have installed/linked 32 bit SDL to a 64 bit machine or the opposite.

@BrendanSimon
Copy link
Author

My system is 64-bit

$ uname -m
x86_64

The object files and libraries all seem to be 64-bit.

$ file /usr/local/lib/libSDL2.*
/usr/local/lib/libSDL2.a:     current ar archive
/usr/local/lib/libSDL2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

$ file Debug/*.o
Debug/main.o: Mach-O 64-bit object x86_64

Doesn't the linker need to link the object files (or a library) in the root directory (which seem to only be generated if I invoke make from the root directory) ???

@BrendanSimon
Copy link
Author

BrendanSimon commented Aug 13, 2018

Note: I have built or installed littlevgl/lvgl. I'm assuming that the littlevgl/pc_simulator is standalone and will build the necessary lvgl dependencies via git submodules.

Is that correct? or do I need to make and install littlevgl/lvgl separately?

@kisvegabor
Copy link
Member

I'm assuming that the littlevgl/pc_simulator is standalone and will build the necessary lvgl dependencies via git submodules.

Yes, just build in Eclipse and it should work.

Pleas ask your question in this thread: #12
Here some guys said they were able to build and run LittelvGL on OSX.

@paulocoutinhox
Copy link
Contributor

Hi,

I have create two pull requests to make it work on OSX latest version. Tested locally:

#21
lvgl/lv_drivers#16

Thanks.

@kisvegabor
Copy link
Member

Both merged! Thank you very much!

It should solve the majoraíty of the OSX issues, so close these issue.

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

3 participants