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

compiler toolchain glitches in 18.12-PRERELEASE #42

Closed
ghost opened this issue Dec 16, 2018 · 1 comment
Closed

compiler toolchain glitches in 18.12-PRERELEASE #42

ghost opened this issue Dec 16, 2018 · 1 comment

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
0 participants
@ghost
Copy link

@ghost ghost commented Dec 16, 2018

Problem 1 - missing header files.

the default install of llvm60 is missing the "*.h" include files that should populate /usr/include. as a result, a test compile of a "hello world" program will fail to find the standard include files.
to recreate:

  1. run compiler-bootstrap llvm60
  2. create a "hello world" program (t.c):
#include <stdio.h>
int main()
{
  printf("hello world!\n");
  return(0);
}

  1. compile with -v:
    cc -v t.c

the compile fails with clang failing to find stdio.h reading the output, the "#include ..." lines show where the toolchain will look for includes. there are two:

/usr/local/llvm60/lib/clang/6.0.1/include
/usr/include

neither one of these contains standard C program header files (stdio.h, ctype.h, etc.) all of those "*.h" files are missing.

Problem 2 - missing libraries
Copying the "*.h" files into /usr/include allows the compile to proceed. however, the linker abends as it cannot find some required libraries:

-lgcc
-lgcc_s
-lc

examining the output of cc -v t.c notes that the linker is looking for all libraries in /usr/lib

the required libraries do exist on a recent trueos build (snapshot 208), but not on a trident build.

@ghost
Copy link
Author

@ghost ghost commented Dec 16, 2018

moved this issue to trident-core and closed it here.

@ghost ghost closed this Dec 16, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment