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

[Brl.Platform] "sys/sysctl.h" not found (on Ubuntu 22.04 LTS) #262

Open
GWRon opened this issue Mar 1, 2023 · 3 comments
Open

[Brl.Platform] "sys/sysctl.h" not found (on Ubuntu 22.04 LTS) #262

GWRon opened this issue Mar 1, 2023 · 3 comments

Comments

@GWRon
Copy link
Contributor

GWRon commented Mar 1, 2023

William reported via discord:

/home/william/Desktop/BlitzMax/mod/brl.mod/platform.mod/glue.c:24:10: fatal error: sys/sysctl.h: No such file or directory
24 | #include <sys/sysctl.h>

and they raised an Q on stackoverflow:
https://askubuntu.com/questions/1457175/fatal-error-sys-sysctl-h-no-such-file-or-directory-compilation-error-why-this

Now ... they is using Ubuntu 22.04 lts -- so I would goess not "mac os".

The blamed LOC is:

#ifdef __APPLE__
#include <sys/sysctl.h>
#endif

PS: I cannot replicate that issue - simply installed Ubuntu 22.04 LTS in a VM and there it works flawless. They claimed to have done the very same on real hardware (... using the commands I gave and my "fetch ng"-script - as I did).

@GWRon GWRon changed the title [Brl.Platform] [Brl.Platform] "sys/sysctl.h" not found (on Ubuntu 22.04 LTS) Mar 1, 2023
@GWRon
Copy link
Contributor Author

GWRon commented Mar 5, 2023

Another use mentioned the very same thing now - on a Linux Mint 21.1

I am running 21.1 too,

A test code:

Framework Brl.StandardIO
?MacOS
print "I am on a Mac"
?not MacOS
print "I am NOT on a Mac"
?

printed "I am NOT on a Mac" for the second user (no feedback by the first - as he installed Ubuntu 18 meanwhile, where it works as it should).

I let user 2 also try out this code:

SuperStrict
Framework Brl.StandardIO


'!#ifdef __APPLE__
'!  fprintf(stdout,"apple\n"); fflush(stdout);
'!#endif

'!#ifdef __linux
'!  fprintf(stdout,"linux\n"); fflush(stdout);
'!#endif


Print "done"

which spit out (correctly):

linux
done

@GWRon
Copy link
Contributor Author

GWRon commented Mar 5, 2023

User 2 mentioned they had simply clicked "Build Modules" in MaxIDE.

When we asked him to compile the module solely via ./bin/bmk makemods -a -h brl.platform this command successfully built the module.

Can some of the modules (built "before") define __APPLE__ somehow?

also interesting are wrong highlighted lines in MaxIDE (here: bah.mod/magick.mod is not yet aware of the image.png-instead-of-brl.pngloader updated)
image

@Scaremonger
Copy link

Does MaxIDE still need Build Modules or is this a hangover from vanilla? Using it implies you have all dependencies for all third party modules installed even if you never use them (database.mod for example).

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