Coder Social home page Coder Social logo

Build error on macOSX about lv_port_pc_eclipse HOT 8 CLOSED

lvgl avatar lvgl commented on September 9, 2024
Build error on macOSX

from lv_port_pc_eclipse.

Comments (8)

CharlesHe023 avatar CharlesHe023 commented on September 9, 2024 1

Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.

It should be solved here:
https://github.com/littlevgl/lv_drivers/blob/master/display/monitor.c#L299

Have you updated lv_drivers?

It works, Thanks.

from lv_port_pc_eclipse.

neilabdev avatar neilabdev commented on September 9, 2024

+1

from lv_port_pc_eclipse.

neilabdev avatar neilabdev commented on September 9, 2024

In summary, when compiling on mac you need to:

  • #define USE_FBDEV 0 // THIS DISABLES USE OF LINUX FB

  • Add #ifdef macro around block in monitor.c file

like the following:

diff --git a/lv_drivers b/lv_drivers
--- a/lv_drivers
+++ b/lv_drivers
@@ -1 +1 @@
-Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f
+Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f-dirty
diff --git a/lv_drv_conf.h b/lv_drv_conf.h
index 9dce4bd..174b818 100644
--- a/lv_drv_conf.h
+++ b/lv_drv_conf.h
@@ -143,7 +143,7 @@
 /*-----------------------------------------
  *  Linux frame buffer device (/dev/fbx)
  *-----------------------------------------*/
-#define USE_FBDEV           1
+#define USE_FBDEV           0
 #if USE_FBDEV != 0
 #define FBDEV_PATH          "/dev/fb0"
 #endif

AND

--- a/lv_drivers
+++ b/lv_drivers
@@ -1 +1 @@
-Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f
+Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f-dirty
diff --git a/lv_drv_conf.h b/lv_drv_conf.h
index 9dce4bd..174b818 100644
--- a/lv_drv_conf.h
+++ b/lv_drv_conf.h
@@ -143,7 +143,7 @@
 /*-----------------------------------------
  *  Linux frame buffer device (/dev/fbx)
  *-----------------------------------------*/
-#define USE_FBDEV           1
+#define USE_FBDEV           0
 #if USE_FBDEV != 0
 #define FBDEV_PATH          "/dev/fb0"
 #endif
[ghost@redux pc_simulator>find . -name monitor.c
./lv_drivers/display/monitor.c
[ghost@redux pc_simulator>cd lv_drivers/
[ghost@redux lv_drivers>git diff
diff --git a/display/monitor.c b/display/monitor.c
index 20d2b7e..46e67fd 100644
--- a/display/monitor.c
+++ b/display/monitor.c
@@ -296,7 +296,7 @@ static void monitor_sdl_refr_core(void)
         SDL_RenderCopy(renderer, texture, NULL, NULL);
         SDL_RenderPresent(renderer);
     }
-
+#ifndef MONITOR_APPLE
     SDL_Event event;
     while(SDL_PollEvent(&event)) {
 #if USE_MOUSE != 0
@@ -329,6 +329,7 @@ static void monitor_sdl_refr_core(void)
 
     /*Sleep some time*/
     SDL_Delay(SDL_REFR_PERIOD);
+#endif
 }
 
 #endif

SEE PR: #29

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on September 9, 2024

Fixed, see : #12 (comment)

from lv_port_pc_eclipse.

CharlesHe023 avatar CharlesHe023 commented on September 9, 2024

Fixed, see : #12 (comment)

Thanks, this works. But failed to run the demo.
Please see the log below:
2018-10-29 17:20:23.728 demo[27003:4540970] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff314742fb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff57dffc76 objc_exception_throw + 48
2 AppKit 0x00007fff2f1a02cf -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4167
3 libSDL2-2.0.0.dylib 0x00000001054201fb Cocoa_PumpEvents + 211
4 libSDL2-2.0.0.dylib 0x00000001053a4847 SDL_PumpEvents_REAL + 23
5 libSDL2-2.0.0.dylib 0x00000001053a48c2 SDL_WaitEventTimeout_REAL + 76
6 demo 0x00000001050bd35d monitor_sdl_refr_thread + 141
7 libSDL2-2.0.0.dylib 0x00000001053ce6d3 SDL_RunThread + 60
8 libSDL2-2.0.0.dylib 0x000000010542c668 RunThread + 9
9 libsystem_pthread.dylib 0x00007fff58c786c1 _pthread_body + 340
10 libsystem_pthread.dylib 0x00007fff58c7856d _pthread_body + 0
11 libsystem_pthread.dylib 0x00007fff58c77c5d thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on September 9, 2024

Just to be sure. Now, the SDL events are NOT handled in monitor_sdl_refr_core() but handled from the main() like this.

What happes if you comment out the event handling?

from lv_port_pc_eclipse.

CharlesHe023 avatar CharlesHe023 commented on September 9, 2024

Just to be sure. Now, the SDL events are NOT handled in monitor_sdl_refr_core() but handled from the main() like this.

What happes if you comment out the event handling?

Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.

from lv_port_pc_eclipse.

kisvegabor avatar kisvegabor commented on September 9, 2024

Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.

It should be solved here:
https://github.com/littlevgl/lv_drivers/blob/master/display/monitor.c#L299

Have you updated lv_drivers?

from lv_port_pc_eclipse.

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.