Definition of ':globals._printf' in conflict with already defined symbol #6
Copy link
Copy link
Open
Description
Issue
AgDev examples don't build due to _printf symbol confilct, other symbols are missing or duplicated.
Output
- Testing the
tests/argsexample:
/home/chandler/Documentos/agon-ce-c-toolchain/tests/args $ make V=1
mkdir -p 'bin'
echo [linking] bin/args.bin
[linking] bin/args.bin
/home/chandler/CEDev/bin/fasmg -v1 '/home/chandler/CEDev/meta/ld.alm' -i 'DEBUG := 0' -i 'HAS_PRINTF := 1' -i 'HAS_LIBC := 1' -i 'HAS_LIBCXX := 1' -i 'PREFER_OS_CRT := 0' -i 'PREFER_OS_LIBC := 1' -i 'ALLOCATOR_STANDARD := 1' -i 'include "/home/chandler/CEDev/meta/linker_script"' -i 'range .bss $D052C6 : $D13FD8' -i 'provide __stack = $D1A87E' -i 'locate .header at $D1A87F' -i map -i 'source "obj/icon.src", "/home/chandler/CEDev/lib/crt/crt0.src", "obj/lto.src"' -i 'library "/home/chandler/CEDev/lib/libload/fatdrvce.lib", "/home/chandler/CEDev/lib/libload/fileioc.lib", "/home/chandler/CEDev/lib/libload/fontlibc.lib", "/home/chandler/CEDev/lib/libload/graphx.lib", "/home/chandler/CEDev/lib/libload/keypadc.lib", "/home/chandler/CEDev/lib/libload/msddrvce.lib", "/home/chandler/CEDev/lib/libload/srldrvce.lib", "/home/chandler/CEDev/lib/libload/usbdrvce.lib"' bin/args.bin
flat assembler version g.kaqg
/home/chandler/CEDev/meta/ld.alm [1568]:
macro ? [1295]:
read source
:read? [14] (CALM)
assemble :temp [1]:
include?! '../lib/libc/printf.src'
/home/chandler/CEDev/meta/../lib/libc/printf.src [8]:
public _printf
public? [26] (CALM)
Error: definition of ':globals._printf' in conflict with already defined symbol.
make: *** [/home/chandler/CEDev/meta/makefile.mk:293: bin/args.bin] Error 2- Testing the
tests/vduexample:
/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu $ make V=1
mkdir -p 'obj/src'
echo [compiling] src/vdp_vdu.c
[compiling] src/vdp_vdu.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/vdp_vdu.c' -o 'obj/src/vdp_vdu.c.bc'
mkdir -p 'obj/src'
echo [compiling] src/vdu.c
[compiling] src/vdu.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/vdu.c' -o 'obj/src/vdu.c.bc'
echo [lto opt] obj/lto.bc
[lto opt] obj/lto.bc
/home/chandler/CEDev/bin/ez80-link '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/src/vdp_vdu.c.bc' '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/src/vdu.c.bc' -o '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.bc'
/home/chandler/CEDev/bin/ez80-clang -S -mllvm -profile-guided-section-prefix=false -Wall -Wextra -Oz '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.bc' -o '/home/chandler/Documentos/agon-ce-c-toolchain/tests/vdu/obj/lto.src'
mkdir -p 'obj'
echo [convimg] description
[convimg] description
/home/chandler/CEDev/bin/convimg --icon-output 'obj/icon.src' --icon-format asm --icon-description "Ag C Toolchain Demo"
mkdir -p 'bin'
echo [linking] bin/vdu.bin
[linking] bin/vdu.bin
/home/chandler/CEDev/bin/fasmg -v1 '/home/chandler/CEDev/meta/ld.alm' -i 'DEBUG := 0' -i 'HAS_PRINTF := 1' -i 'HAS_LIBC := 1' -i 'HAS_LIBCXX := 1' -i 'PREFER_OS_CRT := 0' -i 'PREFER_OS_LIBC := 1' -i 'ALLOCATOR_STANDARD := 1' -i 'include "/home/chandler/CEDev/meta/linker_script"' -i 'range .bss $060000 : $09FFFF' -i 'provide __stack = $D1A87E' -i 'locate .header at $D1A87F' -i map -i 'source "obj/icon.src", "/home/chandler/CEDev/lib/crt/crt0.src", "obj/lto.src"' -i 'library "/home/chandler/CEDev/lib/libload/fatdrvce.lib", "/home/chandler/CEDev/lib/libload/fileioc.lib", "/home/chandler/CEDev/lib/libload/fontlibc.lib", "/home/chandler/CEDev/lib/libload/graphx.lib", "/home/chandler/CEDev/lib/libload/keypadc.lib", "/home/chandler/CEDev/lib/libload/msddrvce.lib", "/home/chandler/CEDev/lib/libload/srldrvce.lib", "/home/chandler/CEDev/lib/libload/usbdrvce.lib"' bin/vdu.bin
flat assembler version g.kaqg
/home/chandler/CEDev/meta/ld.alm [1568]:
macro ? [1295]:
read source
:read? [14] (CALM)
assemble :temp [1]:
include?! '../lib/libc/fclose.c.src'
/home/chandler/CEDev/meta/../lib/libc/fclose.c.src [43]:
extern _mos_fclose
extern? [12] (CALM)
Error: symbol ':globals._mos_fclose' is undefined or out of scope.
make: *** [/home/chandler/CEDev/meta/makefile.mk:293: bin/vdu.bin] Error 2- Testing the
tests/exitexample:
/home/chandler/Documentos/agon-ce-c-toolchain/tests/exit $ make V=1
mkdir -p 'obj/src'
echo [compiling] src/exit.c
[compiling] src/exit.c
/home/chandler/CEDev/bin/ez80-clang -MD -c -emit-llvm -nostdinc -isystem /home/chandler/CEDev/include -Isrc -fno-threadsafe-statics -Xclang -fforce-mangle-main-argc-argv -mllvm -profile-guided-section-prefix=false -DNDEBUG -g0 -Wall -Wextra -Oz 'src/exit.c' -o 'obj/src/exit.c.bc'
src/exit.c:21:8: error: use of undeclared identifier 'EXIT_ABORT'
exit( EXIT_ABORT );
^
1 error generated.
make: *** [/home/chandler/CEDev/meta/makefile.mk:340: obj/src/exit.c.bc] Error 1How to Reproduce
- Download, build and install
ez80-clang,ez80-linkandfasmg - Make a Symbolic Link to
/home/$USER/CEDev/binfolder - Add the directory to
$PATHenvironment variable - Clone the CE C/C++ Toolchain
- Clone AgDev repository
- Copy the root folder contents from AgDev repository to the CE C/C++ Toolchain folder
- Build the CE C/C++ Toolchain
- Install to
/home/$USER/CEDevfolder - Build any example from
testsfolder
System Specs
-` chandler@pc-quarto
.o+` ------------------
`ooo/ OS: Arch Linux x86_64
`+oooo: Host: B450 I AORUS PRO WIFI
`+oooooo: Kernel: 6.7.1-arch1-1
-+oooooo+: Uptime: 2 days, 3 hours, 22 mins
`/:-:++oooo+: Packages: 1871 (pacman)
`/++++/+++++++: Shell: zsh 5.9
`/++++++++++++++: Resolution: 3840x2160
`/+++ooooooooooooo/` DE: GNOME 45.3
./ooosssso++osssssso+` WM: Mutter
.oossssso-````/ossssss+` WM Theme: Adwaita
-osssssso. :ssssssso. Theme: HighContrastInverse [GTK2/3]
:osssssss/ osssso+++. Icons: Adwaita [GTK2/3]
/ossssssss/ +ssssooo/- Terminal: kgx
`/ossssso+/:- -:/+osssso+- CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
`+sso+:-` `.-/+oso: GPU: AMD ATI Radeon RX 6600/6600 XT/6600M
`++:. `-/+/ Memory: 5750MiB / 15912MiB
.` `/Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Chandler-Kluser commentedon Feb 8, 2024
I would appreciate if someone could give better build instructions, because I am not able to compile the AgDev overlayed in TI84+ C/C++ Toolchain with this new release
Thanks in advance!! 😄
astralaster commentedon Feb 8, 2024
Yes, I'm working on that. My idea is to add a CI release pipeline which combines everything automatically as a ZIP file. This should massively reduce user errors.
astralaster commentedon Feb 10, 2024
Now you can download and try the release zip: https://github.com/pcawte/AgDev/releases/tag/v1.1.1
Chandler-Kluser commentedon Feb 10, 2024
Thanks, I will build it from source and check 😄
Chandler-Kluser commentedon Feb 10, 2024
built the toolchain at commit 20fd3c8 and I get the same issue
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
I want to build it from source, there should be no difference between them
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
Is there any possibility for me to reproduce these steps and update the documentation?
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
Not at home, I will check and keep you up to date very soon
Chandler-Kluser commentedon Feb 10, 2024
No.. 😅
I have already commented in this issue, but still getting the same problem.
Maybe I am doing something wrong, but as I far as I know I have done all the build instructions steps.
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
I have already tested them, with the same issue too.
I understood this time I had to compile the TI 84 C/C++ examples without any AgDev overlay
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
I have built the toolchain with
ez80-clang,ez80-linkandfmasgand added all of them into my $PATH environment variable, is there something else?HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
HeathenUK commentedon Feb 10, 2024
Chandler-Kluser commentedon Feb 10, 2024
yes
astralaster commentedon Feb 10, 2024
You should not build anything from source. The release zip already contains all binaries. Just extract it and add the binaries to your path and then make the examples.
Chandler-Kluser commentedon Feb 10, 2024
why I should not build from source?
astralaster commentedon Feb 10, 2024
Because I have not tested what you are building. I plan to build the whole thing from source, too. But the current state is that the toolchain is made of prebuilt binaries and this is tested and works.
mateoconlechuga commentedon Feb 10, 2024
You shouldn't build from source because you are doing it wrong, and developers are sick of having to figure out what you screwed up. That's why you should use a release.
Chandler-Kluser commentedon Feb 11, 2024
Don't be mad because of an issue report. I have never asked for you to figure out anything, BTW
Chandler-Kluser commentedon Feb 11, 2024
I will check what is wrong with the toolchain build instrucions and not rely in these prebuilt binaries that can be compiled only in some machines and report as a patch in this repository
BlastBrothers commentedon Jul 8, 2024
Given that we can build AgDev from source I'm not sure this is relevant anymore.
Chandler-Kluser commentedon Jul 30, 2024
actually, I have built
ez80-clangfrom source again:and the problem persists.
I found very nice AgDev repository has a compile.sh script but actually it just downloads a release for me it does not make sense it to be called this way.
Adding AgDev (at commit
20fd3c8f3e82be6e6226f51633aa7b578faca232) includes leaves again tolto.bcissue:BlastBrothers commentedon Aug 15, 2024
That repo is out of date. Use the compile.sh from AgDev itself.
Chandler-Kluser commentedon Aug 16, 2024
I did