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

tcc doesn't work on OSX: /usr/lib/crt1.o: error: unrecognized file type #16

Open
timotheecour opened this issue Apr 4, 2018 · 0 comments

Comments

@timotheecour
Copy link

timotheecour commented Apr 4, 2018

specific to OSX

brew install tcc
nimble install nrpl
nrpl
> echo 1
/usr/lib/crt1.o: error: unrecognized file type
tcc: error: file 'crt1.o' not found
tcc: error: file 'crti.o' not found
/usr/lib/libdl.dylib: error: bad architecture
tcc: error: library 'dl' not found
Error: execution of an external program failed: 'tcc -o /Users/timothee/git_clone/nim/timn/nrpltmp    -ldl    /Users/timothee/git_clone/nim/timn/nimcache/nrpltmp.o /Users/timothee/git_clone/nim/timn/nimcache/stdlib_system.o'

links

brew install tcc
https://lists.gnu.org/archive/html/tinycc-devel/2017-02/msg00103.html
https://stackoverflow.com/questions/3712902/problems-compiling-tcc-on-os-x
https://github.com/andreiw/tinycc possible port with improved support; but see andreiw/tinycc#1

NOTE: tcc is potentially nice to support, for compile times (important in repl)

workaround:

after #17, use nrpl will use clang by default (also now overridable with --cc:clang )

EDIT: actually tcc -run works (with warnings) even if tcc -c doesn't, so could maybe be used like that (we can only run directly, not compile)
EDIT: see https://github.com/TinyCC/tinycc/issues/8

@timotheecour timotheecour mentioned this issue Apr 4, 2018
1 task
@timotheecour timotheecour changed the title [OSX] /usr/lib/crt1.o: error: unrecognized file type [OSX] /usr/lib/crt1.o: error: unrecognized file type (with cc:tcc) Apr 4, 2018
@timotheecour timotheecour changed the title [OSX] /usr/lib/crt1.o: error: unrecognized file type (with cc:tcc) tcc doesn't work on OSX: /usr/lib/crt1.o: error: unrecognized file type Apr 4, 2018
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

1 participant