cambridgehackers / open-src-cvc

Mirror of tachyon-da cvc Verilog simulator
37 stars 22 forks source link

CVC won't compile on debian bookworm #4

Closed mole99 closed 1 year ago

mole99 commented 2 years ago

Hi, I am trying to compile CVC on debian bookworm (testing) by calling make -f makefile.cvc64.

At first it looks promising, but at the stage where the linker is invoked using

ld --relocatable -o cvclib.o cvc_rt.o v_src_rt.o v_src2.o v_src3.o v_fx_rt.o v_genfx_rt.o v_fx2_rt.o v_fx3_rt.o v_cnv.o v_ex.o v_ex2.o v_ex3.o v_ex4.o v_trch.o v_del.o v_sdf.o v_prp.o v_prp2.o v_sim.o v_dbg.o v_dbg2.o v_cvr.o v_ms_rt.o v_tf.o v_acc.o v_vpi.o v_vpi2.o v_vpi3.o v_aslib.o v_cvcrt.o v_xprop.o v_dpi.o fstapi.o fastlz.o lz4.o

I get the following errors:

ld: v_src_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_src_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_src2.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_src2.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_src3.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_src3.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_fx_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_fx_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_genfx_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_genfx_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_fx2_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_fx2_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_fx3_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_fx3_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_cnv.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_cnv.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_ex.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_ex.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_ex2.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_ex2.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_ex3.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_ex3.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_ex4.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_ex4.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_trch.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_trch.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_del.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_del.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_sdf.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_sdf.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_prp.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_prp.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_prp2.o:(.bss+0x10): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_prp2.o:(.bss+0x8): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_sim.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_sim.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_dbg.o:(.bss+0x1a8): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_dbg.o:(.bss+0x1b0): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_dbg2.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_dbg2.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_cvr.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_cvr.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_ms_rt.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_ms_rt.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_tf.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_tf.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_acc.o:(.bss+0xa8): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_acc.o:(.bss+0xb0): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_vpi.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_vpi.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_vpi2.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_vpi2.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_vpi3.o:(.bss+0x50): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_vpi3.o:(.bss+0x58): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_aslib.o:(.bss+0x68): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_aslib.o:(.bss+0x70): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_cvcrt.o:(.bss+0x1f8): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_cvcrt.o:(.bss+0x200): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_xprop.o:(.bss+0x0): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_xprop.o:(.bss+0x8): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here
ld: v_dpi.o:(.bss+0x8): multiple definition of `__edge_freelst'; cvc_rt.o:(.bss+0x15a60): first defined here
ld: v_dpi.o:(.bss+0x10): multiple definition of `__nxt_ofs'; cvc_rt.o:(.bss+0x15a68): first defined here

My gcc version:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 11.3.0-4' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-ewFA8U/gcc-11-11.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-ewFA8U/gcc-11-11.3.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Debian 11.3.0-4)

Maybe someone has an idea what I could try to solve this issue.

Attached is the complete output: output.log

jahagirdar commented 2 years ago

I am also seeing this issue on linux mint 21. Were you able to find a solution?

jameyhicks commented 2 years ago

I haven't seen a solution to this and do not have time to work on it. I only imported a copy of the sources here because we fixed one or two other problems.

jahagirdar commented 2 years ago

Thanks for the update, I assumed that cambridgehackers were the original maintainers.

jjjt-git commented 1 year ago

After looking at this, I found that these two variables where not declared "extern" in the header. See #5 for patch.

mole99 commented 1 year ago

Awesome! CVC now builds for me on debian bookworm and I can run the installation tests without errors.

Thanks, that solves this issue.