Page MenuHomeSolus

Nim missing dependencies for usage - limits.h GCC crash
Closed, InvalidPublic

Description

Hello.

When I went to try to compile a basic Nim program:

var s = "Test."
echo s

I got a GCC error, dealing with limits.h. I resolved this by installing system.devel, so it might be good to include whatever's necessary from there as a dependency for Nim.

Event Timeline

SolarLune updated the task description. (Show Details)

Got another error on trying to compile a Nim program that requires Nimgame2:

Error: execution of an external compiler program 'gcc -c  -w  -I/usr/lib/nim -o /home/solarlune/Documents/Projects/Nim/Slashburn/src/nimcache/Slashburn_main.o /home/solarlune/Documents/Proje
cts/Nim/Slashburn/src/nimcache/Slashburn_main.c' failed with exit code: 1

cc1: error: /usr/local/include: Permission denied

? /usr/local is an optional tree. What if you sudo mkdir -p /usr/local/include ?

For the first issue (limits.h), you have to install the -devel package for the compiler you use, for example glibc-devel or llvm-devel, no need to install the whole system.devel.

Not strictly true, need linux-headers and glibc-devel at minimum, very likely binutils too.

Got the same issue after making the directory using that command.

If I try to use sudo nim to compile, I get main.nim(1, 16) Error: cannot open 'nimgame2/nimgame' as an error, probably because the dependencies are stored in my home directory, rather than where root expects them to be.

Hey, there!

So I ran into this same error again:

solarlune@solarlune-linux ~/Documents/Projects/Nim/TestGame $ nim compile ./main.nim
Hint: used config file '/etc/nim.cfg' [Conf]
Hint: system [Processing]
Hint: main [Processing]
CC: main
Error: execution of an external compiler program 'gcc -c  -w  -I/usr/lib/nim -o /home/solarlune/Documents/Projects/Nim/TestGame/nimcache/main.o /home/solarlune/Documents/Projects/Nim/TestGame/nimcache/main.c' failed with exit code: 1

cc1: error: /usr/local/include: Permission denied

And I resolved it (I think?) by opening a file manager as root and setting the permissions of /usr/local/ and its contents to be viewable by all other groups.

That makes me wonder why any root folders aren't viewable by all groups in Solus - shouldn't that be the default? So even if it's permitted only to root to edit, any group can at least view the file/folder?

Most of system directories are created with 0755 so they are read-only for non-root users.
Solus doesn't ship /usr/local so it must have been created either by you or installer (like sudo make install). Actually sudo mkdir would create directory with correct 0755 permissions so
buggy install script is the suspect here.

mkdir -p doesn't do anything if directory already exists.

And I resolved it (I think?) by opening a file manager as root and setting the permissions of /usr/local/ and its contents to be viewable by all other groups.

Will be fine if it was applied recursively, to confirm it could you post output of ls -l /usr and ls -l /usr/local?

DataDrake closed this task as Invalid.Oct 8 2018, 11:48 AM
DataDrake added a subscriber: DataDrake.

Closing due to lack of response in over 30 days.