Mercury Bugs - mercury
View Issue Details
0000061mercuryBugpublic2008-06-03 18:402008-06-03 18:41
Reportermaclarty 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000061: problem with _init suffix in module names
DescriptionIf the main predicate is defined in module 'test', and module 'test' imports module 'test_init', then running mmc --make results in the following link error:

** Error making `test'.
Mercury/os/test_init.o: In function `<predicate 'test_init.p'/2 mode 0>':
test_init.c:(.text+0x14): multiple definition of `<predicate 'test_init.p'/2 mod
e 0>'
Mercury/os/test_init.o:test_init.c:(.text+0x14): first defined here
Mercury/os/test_init.o: In function `mercury__test_init__init_debugger':
test_init.c:(.text+0x20): multiple definition of `mercury__test_init__init_debug
ger'
Mercury/os/test_init.o:test_init.c:(.text+0x20): first defined here
Mercury/os/test_init.o: In function `mercury__test_init__init':
test_init.c:(.text+0x40): multiple definition of `mercury__test_init__init'
Mercury/os/test_init.o:test_init.c:(.text+0x40): first defined here
Mercury/os/test_init.o: In function `mercury__test_init__init_type_tables':
test_init.c:(.text+0x70): multiple definition of `mercury__test_init__init_type_
tables'
Mercury/os/test_init.o:test_init.c:(.text+0x70): first defined here
/usr/lib/gcc/i486-linux-gnu/3.4.6/../../../../lib/crt1.o: In function `_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status

TagsNo tags attached.
Attached Files? test.m (162) 2008-06-03 18:40
https://bugs.mercurylang.org/file_download.php?file_id=49&type=bug
? test_init.m (122) 2008-06-03 18:41
https://bugs.mercurylang.org/file_download.php?file_id=50&type=bug

There are no notes attached to this issue.

Issue History
2008-06-03 18:40maclartyNew Issue
2008-06-03 18:40maclartyFile Added: test.m
2008-06-03 18:41maclartyFile Added: test_init.m