Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » SysInfo and Alpine Linux
SysInfo and Alpine Linux [message #55660] Sat, 28 November 2020 18:31 Go to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
SysInfo cannot be compiled in Alpine Linux:
/home/buildbot/dvlp/cpp/code/upp/git/bazaar/SysInfo/SysInfo.cpp:1739:3: error: no matching function for call to 'reboot'
                reboot(0xfee1dead, 672274793, 0xCDEF0123);
                ^~~~~~
/usr/include/sys/reboot.h:15:5: note: candidate function not viable: requires 1 argument, but 3 were provided
int reboot(int);
    ^
/home/buildbot/dvlp/cpp/code/upp/git/bazaar/SysInfo/SysInfo.cpp:1749:3: error: no matching function for call to 'reboot'
                reboot(0xfee1dead, 672274793, 0x01234567);
                ^~~~~~
/usr/include/sys/reboot.h:15:5: note: candidate function not viable: requires 1 argument, but 3 were provided
int reboot(int);

The problem is here:
#if __GNU_LIBRARY__ > 5
		reboot(0xCDEF0123);
#else
		reboot(0xfee1dead, 672274793, 0xCDEF0123);
#endif

Alpine Linux is built around musl libc and __GNU_LIBRARY__ is undefined in it.


Regards,
Novo
Re: SysInfo and Alpine Linux [message #55664 is a reply to message #55660] Sat, 28 November 2020 21:58 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Thank you Novo

I have uploaded a fix. I do not know if Shutdown() function will work in Alpine Linux, but at least I hope it compiles now.


Best regards
Iñaki
Re: SysInfo and Alpine Linux [message #55666 is a reply to message #55664] Sun, 29 November 2020 04:07 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
koldo wrote on Sat, 28 November 2020 15:58
Thank you Novo

I have uploaded a fix. I do not know if Shutdown() function will work in Alpine Linux, but at least I hope it compiles now.

Thanks!
There is another similar place to fix:
/home/buildbot/dvlp/cpp/code/upp/git/bazaar/SysInfo/SysInfo.cpp:1751:3: error: no matching function for call to 'reboot'                                                                           reboot(0xfee1dead, 672274793, 0x01234567);                                                                                                                                         ^~~~~~                                                                                                                                                             /usr/include/sys/reboot.h:15:5: note: candidate function not viable: requires 1 argument, but 3 were provided                                                                      int reboot(int);                                                                                                                                                            


Regards,
Novo
Re: SysInfo and Alpine Linux [message #55678 is a reply to message #55666] Mon, 30 November 2020 08:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Oh yes. Fixed.

Best regards
Iñaki
Re: SysInfo and Alpine Linux [message #55682 is a reply to message #55678] Mon, 30 November 2020 13:55 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Thanks! Everything is fine now.

Regards,
Novo
Re: SysInfo and Alpine Linux [message #55683 is a reply to message #55682] Mon, 30 November 2020 14:06 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
There is a slightly different problem: it wont compile on Mac:
/Users/ssg/dvlp/cpp/code/upp/git/bazaar/SysInfo/SysInfo_in.h:48:11: fatal error: 'X11/Xlib.h' file not found
        #include <X11/Xlib.h>
                 ^~~~~~~~~~~~
1 error generated.

I believe it is supposed to compile on Mac because I see this:
#ifndef PLATFORM_OSX
	#include <sys/vfs.h>
#endif


Regards,
Novo
Re: SysInfo and Alpine Linux [message #55684 is a reply to message #55683] Mon, 30 November 2020 14:21 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Novo wrote on Mon, 30 November 2020 14:06
There is a slightly different problem: it wont compile on Mac:
/Users/ssg/dvlp/cpp/code/upp/git/bazaar/SysInfo/SysInfo_in.h:48:11: fatal error: 'X11/Xlib.h' file not found
        #include <X11/Xlib.h>
                 ^~~~~~~~~~~~
1 error generated.

I believe it is supposed to compile on Mac because I see this:
#ifndef PLATFORM_OSX
	#include <sys/vfs.h>
#endif

I cannot answer. AFAIK SysInfo has never been tested in Mac.

EDIT: If you may confirm that it does not compile in Mac, I will add an explicit error message. Thank you.


Best regards
Iñaki

[Updated on: Mon, 30 November 2020 14:49]

Report message to a moderator

Re: SysInfo and Alpine Linux [message #55686 is a reply to message #55684] Mon, 30 November 2020 15:57 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
It doesn't compile on Mac at this time.
X11/Xlib.h is not available on Mac.


Regards,
Novo
Re: SysInfo and Alpine Linux [message #55687 is a reply to message #55686] Mon, 30 November 2020 17:12 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
BTW, I'm compiling for Mac on Linux ...

Regards,
Novo
Re: SysInfo and Alpine Linux [message #55691 is a reply to message #55687] Mon, 30 November 2020 19:05 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Thank you Novo.
I have added this:
#ifdef PLATFORM_OSX
	#error SysInfo does not support OSX
#endif


Best regards
Iñaki
Re: SysInfo and Alpine Linux [message #55692 is a reply to message #55691] Mon, 30 November 2020 19:31 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
Thanks a lot!

Regards,
Novo
Previous Topic: RasterCtrl - Opening image using StringStream
Next Topic: bazaar -> UppHub
Goto Forum:
  


Current Time: Thu Mar 28 23:10:30 CET 2024

Total time taken to generate the page: 0.01423 seconds