Add a New Comment (Rich Markup)
I recently committed a lot of changes for macos. Please use: git clone git://repo.or.cz/tinycc.git
Verified on head of "mob" branch:
$ ./tcc test.c tcc: error: library 'c' not found
This is due to the issue discussed here: https://news.ycombinator.com/item?id=23612772 Basically, the "*.dylib" files no longer exist on the filesystem, although when you call dlopen() on the paths it still works. This breaks any code that tries to probe for the existence of a library itself rather than just calling dlopen() and seeing if it fails. This seems to be happening inside tcc with tcc_add_library_err() -> tcc_add_library() -> tcc_add_library_internal() -> tcc_add_file_internal() -> _tcc_open() Unfortunately after that point it gets ugly -- I don't even know if it is possible to do anything like what macho_load_dll() is currently doing. On MacOS 11 the way that the system linker works is that it finds a yaml *.tbd file describing the library inside of the SDK (for example /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libc.tbd ) and then does some magic to map that to a symbol to use. It's very confusing to me and I'm not sure how easy it would be to emulate.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only logged-in users can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11