Closed lulunac27a closed 5 months ago
I'm sorry about the slow reply. I removed the '-Werror' flag because different versions of GCC have different levels of fussiness about warnings.
I still get an error when I use make
, make install
or sudo make install
when I update the version:
echo src//program.c src//program_context.c src//main.c
src//program.c src//program_context.c src//main.c
make -C klib
make[1]: `klib.a' is up to date.
make -C libsolunar
make[1]: `libsolunar.a' is up to date.
cc -s -Wl,--gc-sections -o solunar build//program.o build//program_context.o build//main.o libsolunar/libsolunar.a klib/klib.a -lm
ld: warning: -s is obsolete
ld: unknown options: --gc-sections
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think you're using clang, rather than traditional gcc. I haven't tested with clang, and I'm not sure it will work. From the documentation, it looks as if the clang equivalent of --gc-sections is -dead_strip. I don't know what the equivalent of '-s' is, if there is one.
--gc-sections is used in conjuction with -ffunc-sections to remove unused functions from the final executable. That potentially matters a little, because I'm used library code in this utility, from which not all functions are actually used. Rather than -s you could just run 'strip' on the resulting binary -- both will remove debug symbols.
If you just want something that works, you could remove both these offending switches, and the code should still run the same -- it will just be larger than it should be.
Sorry, support for clang isn't really on my radar yet.
I get an error while building this program after running
make install
command on Mac. I'm using MacOS 14.0. Program output: