View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000321 | mercury | Bug | public | 2014-02-20 20:41 | 2014-09-05 15:47 | ||||
Reporter | pbone | ||||||||
Assigned To | pbone | ||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | ||||
Status | closed | Resolution | unable to reproduce | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000321: Exception handling and intermodule optimisation create linker errors | ||||||||
Description | The C linker gives me errors such as: paul@oxygen> mmc --rebuild test -O2 --intermodule-optimization Making Mercury/int3s/test.int3 Making Mercury/ints/test.int Making Mercury/opts/test.opt Making Mercury/cs/test.c Making Mercury/os/test.o Making test ** Error making `test'. Mercury/os/test.o: In function `<predicate 'test.try_divide'/3 mode 0>': test.c:(.text+0xe6): undefined reference to `<predicate 'exception.wrap_success_or_failure'/2 mode 0>' collect2: error: ld returned 1 exit status When I use at least -O2 and --intermodule-optimisation and my module includes exception handling code (see attached). I'm using Mercury 14.01, this bug seems to be recent, it didn't occur in 13.05. I haven't checked versions in between. | ||||||||
Steps To Reproduce | Mercury 14.01 in the low-level C grade, mmc --rebuild test -O2 --intermodule-optimization | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
juliensf (administrator) 2014-04-04 13:35 |
What OS / processor is this occurring on? How was the Mercury compiler built and installed? (E.g. was it directly from the source distribution or was it recompiled on the system that exhibits the problem?) What version of GCC is this? |
pbone (administrator) 2014-04-04 16:35 |
This is my normal Debian Linux on x86_64 system. paul@oxygen> uname -a Linux oxygen 3.12-1-amd64 0000001 SMP Debian 3.12.9-1 (2014-02-01) x86_64 GNU/Linux paul@oxygen> cat /etc/debian_version jessie/sid paul@oxygen> gcc --version gcc (Debian 4.8.2-16) 4.8.2 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I believe (but aren't certain) that I bootstrapped the Mercury installation using the same version. Ie, I used the source distribution, installed a single grade and the compiler, and then untared a fresh build tree and built the real version using the mmc I'd just installed. |
pbone (administrator) 2014-04-24 14:25 |
Working on this now. |
pbone (administrator) 2014-08-12 15:56 |
I revisited this today. It now seems like the exception.opt file that gets installed doesn't match the code compiled into libmer_std.so I don't yet know why or under what conditions this happens, because it doesn't always happen. |
pbone (administrator) 2014-09-05 15:47 |
I can't reliably reproduce this bug. Some installations of Mercury create the bug and some do not. I've tried many times to install different versions of Mercury in different ways and haven't found what causes it. It seems to be something wrong with how the exception module is compiled. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-02-20 20:41 | pbone | New Issue | |
2014-02-20 20:41 | pbone | Status | new => assigned |
2014-02-20 20:41 | pbone | Assigned To | => pbone |
2014-02-20 20:43 | pbone | File Added: bug321.m | |
2014-04-04 13:35 | juliensf | Note Added: 0000658 | |
2014-04-04 16:35 | pbone | Note Added: 0000659 | |
2014-04-24 14:26 | pbone | Note Added: 0000663 | |
2014-04-24 14:26 | pbone | Status | assigned => confirmed |
2014-08-12 15:56 | pbone | Note Added: 0000758 | |
2014-09-05 15:47 | pbone | Note Added: 0000784 | |
2014-09-05 15:47 | pbone | Status | confirmed => closed |
2014-09-05 15:47 | pbone | Resolution | open => unable to reproduce |