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

fteqcc build errors #286

Open
cmdrf opened this issue Oct 12, 2024 · 2 comments
Open

fteqcc build errors #286

cmdrf opened this issue Oct 12, 2024 · 2 comments

Comments

@cmdrf
Copy link

cmdrf commented Oct 12, 2024

Hi!

I can no longer build fteqcc on Linux or macOS. It seems it broke in revision 8dadfb4. Earlier revisions work.

I do make qcc in engine/qclib. Outputs as follows:

Linux AMD64 (Debian 12):

make USEGUI_CFLAGS="" R_qcc
make[1]: Entering directory '<redacted>/fteqw/engine/qclib'
cc -Wno-pointer-sign  -o fteqcc.bin -O3 qccmain.o qcc_pr_comp.o qcc_pr_lex.o packager.o qcctui.o comprout.o hash.o qcc_cmdlib.o qcd_main.o -s -lz -lm
/usr/bin/ld: qcctui.o: warning: relocation against `qcc_vfiles' in read-only section `.text'
/usr/bin/ld: qcctui.o: in function `DoDecompileProgsDat':
qcctui.c:(.text+0x7ac): undefined reference to `DecompileProgsDat'
/usr/bin/ld: qcctui.c:(.text+0x7b3): undefined reference to `qcc_vfiles'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:52: R_qcc] Error 1
make[1]: Leaving directory '<redacted>/fteqw/engine/qclib'
make: *** [Makefile:54: qcc] Error 2

Linux ARM64 (Debian 12):

make USEGUI_CFLAGS="" R_qcc
make[1]: Entering directory '<redacted>/fteqw/engine/qclib'
cc -Wno-pointer-sign  -o fteqcc.bin -O3 qccmain.o qcc_pr_comp.o qcc_pr_lex.o packager.o qcctui.o comprout.o hash.o qcc_cmdlib.o qcd_main.o -s -lz -lm
/usr/bin/ld: qcctui.o: in function `DoDecompileProgsDat':
qcctui.c:(.text+0x854): undefined reference to `DecompileProgsDat'
/usr/bin/ld: qcctui.c:(.text+0x858): undefined reference to `qcc_vfiles'
/usr/bin/ld: qcctui.c:(.text+0x85c): undefined reference to `qcc_vfiles'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:52: R_qcc] Error 1
make[1]: Leaving directory '<redacted>/fteqw/engine/qclib'
make: *** [Makefile:54: qcc] Error 2

macOS ARM64 (15.0.1 "Sequoia"):

/Library/Developer/CommandLineTools/usr/bin/make USEGUI_CFLAGS="" R_qcc
cc -Wno-pointer-sign  -o fteqcc.bin -O3 qccmain.o qcc_pr_comp.o qcc_pr_lex.o packager.o qcctui.o comprout.o hash.o qcc_cmdlib.o qcd_main.o -s -lz -lm
ld: warning: -s is obsolete
Undefined symbols for architecture arm64:
  "_DecompileProgsDat", referenced from:
      _DoDecompileProgsDat in qcctui.o
  "_qcc_vfiles", referenced from:
      _DoDecompileProgsDat in qcctui.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [R_qcc] Error 1
make: *** [qcc] Error 2

Any ideas? Thanks!

@Xylemon
Copy link
Collaborator

Xylemon commented Oct 13, 2024

I do make qcc in engine/qclib. Outputs as follows:

Run make qcc-rel in the engine directory for the FTEQC compiler, it should then dump the built binary into the release folder.

You can also use CMake and pass the -DFTE_TOOL_QCC=TRUE flag if you desire.

@DrLex0
Copy link

DrLex0 commented Dec 17, 2024

The Makefile in the qclib dir lacks decomp.o in its QCC_OBJS line. Add this, and you can also run make qcc or just make there.

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

3 participants