ghdl
ghdl copied to clipboard
GHDL Error when a replacement package body is used
Description In the package, OsvvmScriptSettingsPkg.vhd, I have created a deferred constant. I set the default settings in the package body of this package. I replace those settings with project specific settings in the package body in OsvvmScriptSettingsPkg_generated.vhd.
Expected behaviour Everything should be fine since when the second package body is compiled, it should be replaced by the first.
What is happening During simulation, I am getting the following error message:
ghdl --elab-run --std=08 --syn-binding --work=osvvm_TbStreamTransactionPkg --workdir=C:/tools/sim_temp/GHDL-3.0.0-dev/osvvm_tbstreamtransactionpkg/v08 -PC:/tools/sim_temp/GHDL-3.0.0-dev TbStream_SendGet1
Error: C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/tools/sim_temp/GHDL-3.0.0-dev\osvvm\v08\OsvvmScriptSettingsPkg_generated.o: in function osvvm__osvvmscriptsettingspkg__ELAB_BODY': Error: C:/SynthWorks/Dev/_osvvm/OsvvmLibraries/osvvm/OsvvmScriptSettingsPkg_generated.vhd:(.text+0x0): multiple definition of
osvvm__osvvmscriptsettingspkg__ELAB_BODY'; C:/tools/sim_temp/GHDL-3.0.0-dev\osvvm\v08\OsvvmScriptSettingsPkg.o:C:/SynthWorks/Dev/_osvvm/OsvvmLibraries/osvvm/OsvvmScriptSettingsPkg.vhd:(.text+0x20): first defined here
collect2.exe: error: ld returned 1 exit status
Error: C:\tools\msys64\mingw64\bin\ghdl.exe: compilation error
Simulation Finish time 18:59:21, Elasped time: 0:00:04
Now what Is there a way to turn this aspect of GHDL off. This is something that seems to go beyond language expectations and it seems like it should be off by default.