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 #54

Closed
ghost opened this issue Dec 16, 2018 · 4 comments
Closed

compiler toolchain glitches in 18.12-PRERELEASE #54

ghost opened this issue Dec 16, 2018 · 4 comments

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 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:

run compiler-bootstrap llvm60
create a "hello world" program (t.c):

#include <stdio.h>
int main()
{
  printf("hello world!\n");
  return(0);
}

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.

@jgroenveld
Copy link

@jgroenveld jgroenveld commented Dec 28, 2018

# pkg install `pkg rquery '%o %n' | grep ^base | grep development | awk '{print $2}'`

I think meta-ports to capture dependencies required to build TrueOS and Trident would help here.
John
groenveld@acm.org

@beanpole135
Copy link
Member

@beanpole135 beanpole135 commented Jan 2, 2019

a simpler way of installing the development packages for FreeBSD itself is:
pkg install -g 'OS-*-development'

Once you do that, then you can locally-compile applications as needed.

@beanpole135 beanpole135 closed this Jan 2, 2019
@maxsteciuk
Copy link
Contributor

@maxsteciuk maxsteciuk commented Jan 2, 2019

I have OS dev packages installed
On the similar subject can you please check this pull request (summary description is there)? trueos/trueos#264

@beanpole135
Copy link
Member

@beanpole135 beanpole135 commented Jan 2, 2019

That is a TrueOS issue that one of the TrueOS developers needs to look at as it relates to the pkg base infrastructure itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment