|
|
Home » Developing U++ » UppHub » SysInfo and Alpine Linux
SysInfo and Alpine Linux [message #55660] |
Sat, 28 November 2020 18:31  |
Novo
Messages: 1430 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 #55666 is a reply to message #55664] |
Sun, 29 November 2020 04:07   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
koldo wrote on Sat, 28 November 2020 15:58Thank 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 #55683 is a reply to message #55682] |
Mon, 30 November 2020 14:06   |
Novo
Messages: 1430 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   |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
Novo wrote on Mon, 30 November 2020 14:06There 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
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun May 11 22:43:09 CEST 2025
Total time taken to generate the page: 0.00891 seconds
|
|
|