You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a link error when building a program, tpa (for test parse_args) that uses parse_args. The program is cut down from the generic_example program in the parse_args distribution, and I've set it up as an alire crate, done alr with parse_args, and have done alr build to build it. The repository with the program is https://github.com/tkurtbond/tpa and the program is only 31 lines long.
In summary, when linking the program I get an error from ld that in my tpa_options.o file in the function tpa_options__compass_option__inner__value__B218s___finalizer__3.3 that there is an undefined reference to parse_args__option_maps__constant_reference_typeDF.
Here is the error text I get when building:
Note: Building tpa=0.1.0-dev/tpa.gpr...
Link
[link] tpa.adb
/home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/bin/../lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/tkb/Repos/tpa/obj/development/tpa_options.o: in function `tpa_options__compass_option__inner__value__B218s___finalizer__3.3':
tpa_options.ads:(.text.tpa_options__compass_option__inner__value__B218s___finalizer__3.3+0x40): undefined reference to `parse_args__option_maps__constant_reference_typeDF'
/home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/bin/../lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /home/tkb/Repos/tpa/obj/development/tpa_options.o: in function `tpa_options__compass_option__inner__value__B229s___finalizer__3.4':
tpa_options.ads:(.text.tpa_options__compass_option__inner__value__B229s___finalizer__3.4+0x40): undefined reference to `parse_args__option_maps__constant_reference_typeDF'
collect2: error: ld returned 1 exit status
gprbuild: link of tpa.adb failed
gprbuild: failed command was: /home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/bin/gcc tpa.o b__tpa.o /home/tkb/Repos/tpa/obj/development/tpa_options.o /home/tkb/.local/share/alire/builds/parse_args_0.9.0_635f9e4f/1f6a17103c97916161bc6b273ce2fc17a6eba5985cb146cdc481b7d714375da2/lib/libparse_args.a -L/home/tkb/Repos/tpa/obj/development/ -L/home/tkb/Repos/tpa/obj/development/ -L/home/tkb/.local/share/alire/builds/parse_args_0.9.0_635f9e4f/1f6a17103c97916161bc6b273ce2fc17a6eba5985cb146cdc481b7d714375da2/lib/ -L/home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0/adalib/ -static-libgcc /home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0/adalib/libgnarl.a /home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0/adalib/libgnat.a -lrt -lpthread -ldl -Wl,-rpath-link,/home/tkb/.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0//adalib -Wl,-z,origin,-rpath,$ORIGIN/..//obj/development:$ORIGIN/../../..//.local/share/alire/builds/parse_args_0.9.0_635f9e4f/1f6a17103c97916161bc6b273ce2fc17a6eba5985cb146cdc481b7d714375da2/lib:$ORIGIN/../../..//.local/share/alire/toolchains/gnat_native_14.2.1_06bb3def/lib/gcc/x86_64-pc-linux-gnu/14.2.0/adalib -o /home/tkb/Repos/tpa/bin//tpa
ERROR: Command ["gprbuild", "-s", "-j0", "-p", "-P", "/home/tkb/Repos/tpa/tpa.gpr"] exited with code 4
ERROR: Compilation failed.
The text was updated successfully, but these errors were encountered:
Your test program compiles and runs if I don't use Alire and just directly compile it with the native compiler. The parse_arg package and examples also all compile and run with direct use of the latest GPRBuild 25.0w and GNAT 14.2.1 (not very surprising as the sources use the No_Implementation_Extensions profile so they should be forward-compatible).
This suggests that there is something going wrong with the Alire build process, either with the way I have packaged parse_args, or something specific to your configuration. I am not very knowledgeable about Alire and how it interacts with the underlying Ada build system, but I will try to look into it when I have some time.
I'm getting a link error when building a program, tpa (for test parse_args) that uses parse_args. The program is cut down from the generic_example program in the parse_args distribution, and I've set it up as an alire crate, done alr with parse_args, and have done
alr build
to build it. The repository with the program is https://github.com/tkurtbond/tpa and the program is only 31 lines long.In summary, when linking the program I get an error from ld that in my tpa_options.o file in the function
tpa_options__compass_option__inner__value__B218s___finalizer__3.3
that there is an undefined reference toparse_args__option_maps__constant_reference_typeDF
.Here is the error text I get when building:
The text was updated successfully, but these errors were encountered: