Next problem.

I'm using the latest mercurial snapshot of GHDL with GCC backend.
When I run GHDL to elaborate a design, it gives a linker error.

joris$ ghdl -e tb_downsampler

/data/tmp/ghdl/lib/gcc/x86_64-unknown-linux-gnu/4.9/vhdl//libgrt.a(grt-vstrings.o):
 In function `grt__vstrings__to_string__3':
/home/joris/projects/debian/ghdl/g/gcc/src/gcc/vhdl/grt/grt-vstrings.adb:301: 
undefined reference to `trunc'
/data/tmp/ghdl/lib/gcc/x86_64-unknown-linux-gnu/4.9/vhdl//libgrt.a(grt-cvpi.o): 
In function `module_open':
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:175:
 undefined reference to `dlopen'
/data/tmp/ghdl/lib/gcc/x86_64-unknown-linux-gnu/4.9/vhdl//libgrt.a(grt-cvpi.o): 
In function `module_symbol':
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:181:
 undefined reference to `dlsym'
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:181:
 undefined reference to `dlsym'
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:181:
 undefined reference to `dlsym'
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:181:
 undefined reference to `dlsym'
/data/tmp/ghdl/lib/gcc/x86_64-unknown-linux-gnu/4.9/vhdl//libgrt.a(grt-cvpi.o): 
In function `module_error':
/home/joris/projects/debian/ghdl/g/gcc/build/gcc/vhdl/../../../src/gcc/vhdl/grt/grt-cvpi.c:187:
 undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
/data/tmp/ghdl/bin/ghdl: compilation error

Searching old bug reports indicated that this problem may be caused by missing 
items in grt.lst.
Indeed, my grt.lst file contained only these three lines:
@/libgrt.a
-L./
-lz

After manually modifying grt.lst to add "-lm" and "-ldl", GHDL could elaborate 
my design just fine.

I noticed that the magic to determine GRT_EXTRA_LIB in src/grt/Makefile.inc was 
changed a few weeks ago. Could there be a problem there?
My target architecture is x86_64-linux-gnu.

Joris.

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to