View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000358 | mercury | Bug | public | 2014-09-03 23:09 | 2014-09-04 08:22 | ||||
Reporter | lpimmes | ||||||||
Assigned To | zs | ||||||||
Priority | urgent | Severity | crash | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Oracle Linux 6.5 | OS | OS Version | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000358: mih files not found, but code works on OSX maverick | ||||||||
Description | [oracle@localhost fileIO]$ mmc --version Mercury Compiler, version 14.01, configured for x86_64-unknown-linux-gnu Copyright (C) 1993-2014 The University of Melbourne | ||||||||
Steps To Reproduce | fileIO.m requires ../lpiUtil.m [oracle@localhost fileIO]$ make mmc --make --fully-strict -E -v --use-subdirs fileIO \ --grade hlc.gc \ -O 6 \ --search-lib-files-dir ../lpiUtil \ --init-file ../lpiUtil/lpiUtil.init \ --link-object ../lpiUtil/liblpiUtil.a ** Error: file `Mercury/mihs/lpiUtil.mih' not found: file `lpiUtil.mih' not found make: *** [fileIO] Error 1 .so file present; normally it would be absent. [oracle@localhost lpiUtil]$ ls liblpiUtil.a liblpiUtil.so lpiUtil.err lpiUtil.init lpiUtil.m lpiUtil.mh Makefile Mercury [oracle@localhost lpiUtil]$ uname -a Linux localhost.localdomain 3.8.13-16.2.1.el6uek.x86_64 0000001 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux [oracle@localhost lpiUtil]$ [oracle@localhost lpiUtil]$ mmc --version Mercury Compiler, version 14.01, configured for x86_64-unknown-linux-gnu Copyright (C) 1993-2014 The University of Melbourne [oracle@localhost lpiUtil]$ Makefile for lpiUtil.m [oracle@localhost lpiUtil]$ cat Makefile # 05/28/2014 # make # none.gc.stseg ;; works, i.e. compile, link # hlc.gc ;; works, i.e, compile, link, provided you declare GRADE = hlc.gc #GRADE = java default: liblpiUtil liblpiUtil: mmc --make liblpiUtil # To start over from scratch, type 'make clean'. clean: $(RM) *~ $(RM) -rf Mercury $(RM) liblpiUtil $(RM) *.err $(RM) *.mh $(RM) *.init $(RM) *.a $(RM) *.dylib [oracle@localhost lpiUtil]$ fileIO.m (with lpiUtil.m) Code compiles and runs perfectly on: fileIO 497>uname -a Darwin luke-immess-imac-2.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 fileIO 497>mmc --version Mercury Compiler, version 14.01, configured for x86_64-apple-darwin13.1.0 Copyright (C) 1993-2014 The University of Melbourne fileIO 497> It is probably a compiler or linker option; but not sure how to proceed. Any ideas? Thanks. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
|
Notes | |
lpimmes (reporter) 2014-09-03 23:18 |
Adding: mmc --lib-linkage static --make liblpiUtil Same problem occurs when compiling fileIO.m that requires lpiUtil.m [oracle@localhost fileIO]$ make ... e-to-c --use-subdirs fileIO' % Touching `Mercury/err_dates/fileIO.err_date'... done. % Parsing module `fileIO' and imported interfaces... % Module qualifying items... % done. % Expanding equivalence types... % done. % Converting parse tree to hlds... % done. % Post-processing type definitions... % Checking typeclasses... % Checking instance declaration types... % Checking typeclass instances... % Checking for cyclic classes... % Checking for missing concrete instances... % Checking functional dependencies on instances... % Checking typeclass constraints... ... error log truncated, see `fileIO.err' for the complete log. ** Error: file `Mercury/mihs/lpiUtil.mih' not found: file `lpiUtil.mih' not found make: *** [fileIO] Error 1 |
lpimmes (reporter) 2014-09-03 23:59 |
Problem fixed: you must use same GRADE for library as well as caller of that library. mmc --lib-linkage static --grade ${GRADE} --make liblpiUtil |
zs (developer) 2014-09-04 08:22 |
Before reporting another bug, please consider that the problem may not be in the Mercury system but in your understanding of it. The proper venue for such questions is the mercury-users mailing list, not the bug database. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2014-09-03 23:09 | lpimmes | New Issue | |
2014-09-03 23:18 | lpimmes | Note Added: 0000781 | |
2014-09-03 23:59 | lpimmes | Note Added: 0000782 | |
2014-09-04 08:22 | zs | Note Added: 0000783 | |
2014-09-04 08:22 | zs | Status | new => closed |
2014-09-04 08:22 | zs | Assigned To | => zs |
2014-09-04 08:22 | zs | Resolution | open => no change required |