cc65: ca65: .macpack doesn't look for files in cc65 share dir
ca65 -I common -o 01-implied.o 01-implied.a
common/macros.a:28: Error: Cannot open include file 'longbranch.mac': No such file or directory
the file is available in /share/cc65/asminc/longbranch.mac i.e. in one of cc65’s own directories.
strace from the above:
access("common/longbranch.mac", F_OK) = -1 ENOENT (No such file or directory)
access("longbranch.mac", F_OK) = -1 ENOENT (No such file or directory)
access("common/longbranch.mac", F_OK) = -1 ENOENT (No such file or directory)
access("longbranch.mac", F_OK) = -1 ENOENT (No such file or directory)
writev(2, [{"", 0}, {"common/macros.a:28: Error: Cannot open include file 'longbranch.mac': No such file or directory\n", 96}], 2common/macros.a:28: Error: Cannot open include file 'longbranch.mac': No such file or directory
) = 96
the expected behaviour is that the assembler always looks for files included via .macpack in it’s own include dir (if the above search in explicitly specified include dirs fails), much like e.g. gcc search for headers it ships inside its own directory tree, e.g. when you #include <xmmintrin.h>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 58 (47 by maintainers)
Commits related to this issue
- build: properly quote strings passed as cpp macros until now, the strings intended to be hardcoded into the binary, such as directory names and build id, were passed unquoted, which means they're int... — committed to rofl0r/cc65 by rofl0r 2 years ago
- build: allow empty prefix there was some concern that this will break windows' way of doing file lookups relatively from the binary, rather than via hardcoded locations, but so far each occurence add... — committed to rofl0r/cc65 by rofl0r 2 years ago
- build: properly quote strings passed as cpp macros until now, the strings intended to be hardcoded into the binary, such as directory names and build id, were passed unquoted, which means they're int... — committed to mrdudz/cc65 by rofl0r 2 years ago
- build: allow empty prefix there was some concern that this will break windows' way of doing file lookups relatively from the binary, rather than via hardcoded locations, but so far each occurence add... — committed to mrdudz/cc65 by rofl0r 2 years ago
- dev-lang/cc65: specify `$PREFIX` at compile .macpack fails to find the $PREFIX/share/cc65 directory when `$PREFIX` is not specified at compile time—not install time. See <https://github.com/cc65/cc65... — committed to gentoo/guru by ssterling a year ago
In src/Makefile:71, the build system determines if the suffix exe is to be used (
Shouldn’t this be exactly the case(s) when Windows is built?
We can not use uname (or COMSPEC) - we need to correctly detect a crosscompiler running on linux too. ie we must check what we are compiling for, not what we are compiling on
I wonder if there is a good way to test these things in a testcase…
anyhow, i’d like to fix this a bit cleaner and more throughout… like: a) remove extra slashes from pathes in the makefile so they dont even end up in those pathes b) escape the quotes in all those pathes, not just those you needed to make it work for you c) not remove the if expression for empty prefix, because this is actually needed for the intended “in tree” searching