Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent link failures (C back-end) #1217

Open
cgay opened this issue Mar 24, 2019 · 0 comments
Open

Silent link failures (C back-end) #1217

cgay opened this issue Mar 24, 2019 · 0 comments

Comments

@cgay
Copy link
Member

cgay commented Mar 24, 2019

[Open Dylan 2019.1pre]

With the C back-end a link failure can go completely unreported:

12:31:34 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ dylan-compiler -build typed-richards.lid 
Opened project typed-richards (/home/cgay/dylan/ws.od/opendylan/sources/testing/benchmarks/richards/typed-richards.hdp)
Loading namespace for library typed-richards
...
Build of 'typed-richards' completed
Linking typed-richards

12:32:28 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ echo $?
0

12:32:32 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ ls -l _build/bin
total 24
-rwxr-xr-x 1 cgay cgay  6416 Mar 23 23:24 simple-richards
-rwxr-xr-x 1 cgay cgay 13232 Mar 23 23:24 simple-richards.dbg

12:42:19 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ cat _build/build/typed-richards/build.log 
building targets: exe
Cc typed-richards.o : typed-richards.c
typed-richards.c:1072:21: note: previous definition of ‘KLtask_control_blockGVtyped_richardsW’ was here
 _KLmm_wrapperGVKi_0 KLtask_control_blockGVtyped_richardsW = {
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Command failed: gcc -c -o "typed-richards.o" -w -g -O2 -DOPEN_DYLAN_PLATFORM_UNIX -DOPEN_DYLAN_PLATFORM_LINUX -DOPEN_DYLAN_ARCH_X86_64 -DGC_THREADS -DGC_USE_BOEHM -fPIC  -I/home/cgay/dylan/opendylan-2019.1pre/include "typed-richards.c"

The LLVM back-end gets it right:

12:42:39 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ dylan-compiler -build -back-end llvm typed-richards.lid 
Opened project typed-richards (/home/cgay/dylan/ws.od/opendylan/sources/testing/benchmarks/richards/typed-richards.hdp)
Loading namespace for library typed-richards
...
Optimizing library typed-richards
Generating code for library typed-richards

Internal error: value @KLtask_control_blockGVtyped_richardsW is multiply defined
Exiting with return code -1

12:46:05 ~/dylan/ws.od/opendylan/sources/testing/benchmarks/richards (platforms)*
$ echo $?
255

So I don't consider this very high priority given that the LLVM back-end will be the default soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant