#30338 closed defect (fixed)
clisp @2.49 compiler errors - build failure
Reported by: | macports@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.0 |
Keywords: | lion | Cc: | waqar@…, easye, cofyc.jackson@…, weiju.wu@…, odbgza@…, sammelweis@…, elwin.luo@…, mcandre (Andrew Pennebaker), shaktool@…, ryandesign (Ryan Carsten Schmidt), yoursurrogategod@…, anddam (Andrea D'Amore), joaomlneto@…, huquanjun@… |
Port: | clisp |
Description
Using Xcode 4.1, I see the following:
---> Building clisp mkdir -p gllib test -f gllib/Makefile || sh config.status gllib/Makefile depfiles cd gllib && make CFLAGS="-W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_MODULES -I. -fPIC" CLISP_LIBDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/work/clisp-2.49/src cd .. && make am--refresh make[2]: Nothing to be done for `am--refresh'. make[2]: Nothing to be done for `am--refresh'. make all-recursive cd .. && make am--refresh make[3]: Nothing to be done for `am--refresh'. make[3]: Nothing to be done for `am--refresh'. cd .. && make am--refresh make[4]: Nothing to be done for `am--refresh'. make[4]: Nothing to be done for `am--refresh'. make[3]: Nothing to be done for `all-am'. test -r libgnu_cl.a || ln -s gllib/libgnu.a libgnu_cl.a /Developer/usr/bin/llvm-gcc-4.2 -arch i386 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/work/clisp-2.49/src/gllib -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_MODULES -I. -c modules.c modules.c:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'module_count' modules.c:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'subr_tab_data_size' modules.c:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'object_tab_size' modules.c:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'modules' make: *** [modules.o] Error 1 shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/work/clisp-2.49/src && ulimit -s 16384 && unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && make" returned error 2 Error: Target org.macports.build returned: shell command failed (see log for details) Warning: the following items did not execute (for clisp): org.macports.activate org.macports.build org.macports.destroot org.macports.install Log for clisp is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
Full debug output attached.
Attachments (11)
Change History (67)
Changed 13 years ago by macports@…
comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | waqar@… easieste@… added |
---|
comment:2 Changed 13 years ago by weiju.wu@…
This happens to me, too. I work on OS X Lion and MacPorts 2.0.0.
comment:4 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | weiju.wu@… added |
---|---|
Keywords: | lion added |
comment:5 Changed 13 years ago by easye
Patching to use gcc-4.2 as opposed to the default clang gets through the compilation but them hangs in compiling the lisp code at this step:
./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -M halfcompiled.mem -q -c loop.lisp -o ./
comment:6 follow-up: 11 Changed 13 years ago by odbgza@…
Same for me OSX 10.7 Xcode 4.1 Build 4B110
main.log:
... :info:build (echo; echo '/* genclisph */' ; ./genclisph clisp-test.c ; echo ; echo '#endif /* _CLISP_H */') >> clisp.h :info:build writing test file clisp-test.c :info:build stdbool.h: No such file or directory :info:build /Developer/usr/bin/llvm-gcc-4.2 -arch i386 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/work/clisp-2.49/src/gllib -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_MODULES -I. -DUSE_CLISP_H=1 -DCOMPILE_STANDALONE clisp-test.c -o clisp-test-clisp :info:build clisp-test.c: In function ‘main’: :info:build clisp-test.c:18: error: expected declaration or statement at end of input :info:build make: *** [clisp.h] Error 1 :info:build shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/work/clisp-2.49/src && ulimit -s 16384 && unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && make" returned error 2 ...
comment:8 Changed 13 years ago by sammelweis@…
Same here... OS X Lion, Xcode 4.1, MacPorts 2.0.1
Exact same errors in modules.c as original poster
comment:11 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | andrew.pennebaker@… added |
---|
comment:13 follow-up: 14 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Did r83615 resolve this issue?
comment:14 Changed 13 years ago by macports@…
comment:15 Changed 13 years ago by anddam (Andrea D'Amore)
You should either selfupdate or sync dports, according to your configuration. The svn repository (sync) gets updates immediately while the rsync one (selfupdate) should have a 12 hours delay, IIRC.
Remember to perform a clean before building again.
comment:16 follow-up: 18 Changed 13 years ago by sammelweis@…
For me, the error has changed. Last lines of the log:
:info:build ld: warning: ignoring file /opt/local/lib/libncurses.dylib, file was built for unsupported file format which is not the architecture being linked (i386) :info:build Undefined symbols for architecture i386: :info:build "_tgetent", referenced from: :info:build _update_linelength in spvw.o :info:build _make_keyboard_stream in stream.o :info:build _C_make_window in stream.o :info:build "_tgetnum", referenced from: :info:build _update_linelength in spvw.o :info:build _C_make_window in stream.o :info:build "_tputs", referenced from: :info:build _change_attr in stream.o :info:build _C_clear_window in stream.o :info:build _gofromto in stream.o :info:build _clear_linepart in stream.o :info:build _wr_ch_window in stream.o :info:build _C_clear_window_to_eot in stream.o :info:build _redisplay in stream.o :info:build ... :info:build "_tgetstr", referenced from: :info:build _make_keyboard_stream in stream.o :info:build _C_make_window in stream.o :info:build "_tgoto", referenced from: :info:build _gofromto in stream.o :info:build _C_insert_window_line in stream.o :info:build _C_delete_window_line in stream.o :info:build _C_make_window in stream.o :info:build "_tgetflag", referenced from: :info:build _C_make_window in stream.o :info:build ld: symbol(s) not found for architecture i386 :info:build collect2: ld returned 1 exit status :info:build make: *** [lisp.run] Error 1 :info:build shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_clisp/clisp/work/clisp-2.49/src && ulimit -s 16384 && unset LD_PREBIND LD_PREBIND_ALLOW_OVERLAP && make" returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "$procedure $targetname" :info:build Warning: the following items did not execute (for clisp): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for clisp is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_clisp/clisp/main.log
Changed 13 years ago by sammelweis@…
Attachment: | main.log_sammelweis added |
---|
main.log for clisp after selfupdate on sept 8, 2011
comment:17 Changed 13 years ago by weiju.wu@…
Tried clean, selfupdate and install, but it still fails.
comment:18 follow-up: 20 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to sammelweis@…:
:info:build ld: warning: ignoring file /opt/local/lib/libncurses.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Clearly your ncurses library is built for the wrong architecture. If your ncurses port had been installed with MacPorts 1.9 or later, MacPorts would have noticed this and rebuilt ncurses universal. Since it did not, that suggests your ncurses port was installed with MacPorts 1.8 or earlier, which predates Lion. This in turn suggests that it was installed before you upgraded to Lion, and that when you upgraded to Lion you did not follow the Migration procedure.
comment:19 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
Changed 13 years ago by shaktool@…
Attachment: | main.2.log added |
---|
randomly segfaults compiling a lisp file, can get past that by building again but it still doesn't work.
comment:20 follow-up: 22 Changed 13 years ago by sammelweis@…
Replying to ryandesign@…:
Clearly your ncurses library is built for the wrong architecture. If your ncurses port had been installed with MacPorts 1.9 or later, MacPorts would have noticed this and rebuilt ncurses universal. Since it did not, that suggests your ncurses port was installed with MacPorts 1.8 or earlier, which predates Lion. This in turn suggests that it was installed before you upgraded to Lion, and that when you upgraded to Lion you did not follow the Migration procedure.
I thought I only installed MacPorts after I installed Lion, but apparently there was still an old version on my disk. Thanks for pointing out the problem. I uninstalled and reinstalled all packages, and now also get a segfault while building.
comment:22 follow-up: 24 Changed 13 years ago by yoursurrogategod@…
Replying to sammelweis@…:
Replying to ryandesign@…:
Clearly your ncurses library is built for the wrong architecture. If your ncurses port had been installed with MacPorts 1.9 or later, MacPorts would have noticed this and rebuilt ncurses universal. Since it did not, that suggests your ncurses port was installed with MacPorts 1.8 or earlier, which predates Lion. This in turn suggests that it was installed before you upgraded to Lion, and that when you upgraded to Lion you did not follow the Migration procedure.
I thought I only installed MacPorts after I installed Lion, but apparently there was still an old version on my disk. Thanks for pointing out the problem. I uninstalled and reinstalled all packages, and now also get a segfault while building.
Just curious, what did you do exactly? I uninstalled _everything_ that I could think of (I have Macports 2.0.2) and it still doesn't work. Could you please paste the commands as to how you resolved the issue here?
comment:23 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
I don't know what to do about the segfaults. They shouldn't be happening. I suggest you report them to the developers of clisp.
comment:24 Changed 13 years ago by sammelweis@…
Replying to yoursurrogategod@…:
Just curious, what did you do exactly? I uninstalled _everything_ that I could think of (I have Macports 2.0.2) and it still doesn't work. Could you please paste the commands as to how you resolved the issue here?
Reinstall Macports and maybe Xcode (though you probably did this already), then use these commands and reinstall everything you need that is listed in myports.txt as it says on the Migration page which ryandesign@… mentioned. Good luck.
port -qv installed > myports.txt sudo port -fp uninstall --follow-dependents installed sudo port clean all
comment:25 follow-up: 26 Changed 13 years ago by yoursurrogategod@…
Silly question. Never done this before... but how do I uninstall in a Mac?
comment:26 Changed 13 years ago by shaktool@…
Replying to yoursurrogategod@…:
Silly question. Never done this before... but how do I uninstall in a Mac?
Well, that depends on what you want to uninstall. For ordinary Mac OS X apps, you drag them from /Applications/ to the trash bin, and then empty the trash bin. But for Unix-y things, including Xcode and its suite of command line tools, you have to uninstall them in more Unix-y ways. I actually reinstalled Xcode myself after installing Lion, and that involved something like this: http://macdevelopertips.com/xcode/how-to-uninstall-xcode.html
comment:27 follow-up: 28 Changed 13 years ago by yoursurrogategod@…
... how do I reinstall Xcode? I can only get it through the AppStore and it keeps saying that it's installed... but it's not...
comment:28 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to yoursurrogategod@…:
... how do I reinstall Xcode? I can only get it through the AppStore and it keeps saying that it's installed... but it's not...
The App Store only installs the Xcode installer for you. You need to now run that installer. It's called "Install Xcode" and is in your Applications folder.
comment:29 Changed 13 years ago by yoursurrogategod@…
Ok, I re-installed Xcode, I nuked from orbit MacPorts (even removed some of the directories that the guide said about uninstalling MacPorts), re-installed (from source) MacPorts and am trying to install CLisp.
And... there seems to be a different problem. The install hasn't failed, but when it gets to the part about "Building clisp" it takes forever. It's been about 30 minutes and it's still there. Is this normal?
comment:30 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Could be. Some ports take a bit of time to build. To see if it's still actually building, which it probably is, you could open a second terminal window and type:
tail -f $(port logfile clisp)
When you're done looking at that, you can interrupt it with ctrl+c. Make sure you're in the "tail -f" window when you ctrl+c, not the "port install" window or you'll actually interrupt the build.
comment:31 Changed 13 years ago by yoursurrogategod@…
It still fails. I interrupted that install in favor of installing other stuff and went back to it only to see it go down in flames.
Can anyone say for sure where the issue lies? Is it with the clisp build version or MacPorts?
My guess that my really long earlier build was a fluke, since the problem re-appeared so quickly.
comment:32 follow-up: 33 Changed 13 years ago by yoursurrogategod@…
I get the same error when I try to build gcc46.
---> Building gcc46 Error: Target org.macports.build returned: shell command failed (see log for details) Log for gcc46 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc46/gcc46/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
comment:33 follow-up: 36 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to yoursurrogategod@…:
It still fails. I interrupted that install in favor of installing other stuff and went back to it only to see it go down in flames.
Can anyone say for sure where the issue lies? Is it with the clisp build version or MacPorts?
What error are you experiencing, exactly? Please clean clisp, try again, and if it fails again, attach the main.log file.
Replying to yoursurrogategod@…:
I get the same error when I try to build gcc46.
Remember to use WikiFormatting please. I doubt you are seeing a similar error with gcc46. Please open a new ticket about gcc46 and attach gcc46's main.log there (if no existing gcc46 bug report is applicable, but check for example #31171).
Changed 13 years ago by joaomlneto@…
Attachment: | joaomlneto.log added |
---|
sudo port clean lisp; sudo port -d install clisp > output.log 2>&1
Changed 13 years ago by mhaeberli@…
Attachment: | main.3.log added |
---|
comment:36 Changed 13 years ago by mhaeberli@…
Replying to ryandesign@…:
Replying to yoursurrogategod@…:
It still fails. I interrupted that install in favor of installing other stuff and went back to it only to see it go down in flames.
Can anyone say for sure where the issue lies? Is it with the clisp build version or MacPorts?
What error are you experiencing, exactly? Please clean clisp, try again, and if it fails again, attach the main.log file.
Replying to yoursurrogategod@…:
I get the same error when I try to build gcc46.
Remember to use WikiFormatting please. I doubt you are seeing a similar error with gcc46. Please open a new ticket about gcc46 and attach gcc46's main.log there (if no existing gcc46 bug report is applicable, but check for example #31171).
see attached main3.log
sudo port install clasp
failed with error:
Error: Target org.macports.build returned: shell command failed (see log for details) Log for clisp is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_clisp/clisp/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
then:
- cleaned all ports
sudo port install clisp
(ran forever, 10+ hours, looked hung)- killed above hung
sudo port install clasp
sudo port clean clasp
sudo port install clisp
(same error as above); main.log attached as main3.log
Changed 13 years ago by joaomlneto@…
Attachment: | joaomlneto_main.log added |
---|
clips's main.log after running 'sudo port -d install clisp > output.log 2>&1'
comment:37 follow-up: 44 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Please remember to use WikiFormatting and preview before posting so your entries are legible.
Also please note the difference between "clisp" and "clasp".
comment:38 follow-up: 41 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
joaomlneto, you don't need to attach two logs for the same problem; one log, the main.log, is sufficient. In your logs I see a segmentation fault, similar to what was reported earlier in the ticket, and I requested people report that to the developers of clisp. Have you done that? What did they say?
comment:39 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
mhaeberli in your log I also see a segmentation fault, so same question to you.
comment:40 Changed 13 years ago by shaktool@…
I reported it: http://sourceforge.net/tracker/?func=detail&atid=101355&aid=3407931&group_id=1355
There's a response but I didn't get a chance to investigate yet.
comment:41 Changed 13 years ago by joaomlneto@…
Replying to ryandesign@…:
joaomlneto, you don't need to attach two logs for the same problem; one log, the main.log, is sufficient. In your logs I see a segmentation fault, similar to what was reported earlier in the ticket, and I requested people report that to the developers of clisp. Have you done that? What did they say?
Sorry, I overlooked the file contents, just compared their size and decided I should send you pretty much everything. Sorry :) I also didn't see your indications to submit the files to clisp devs.
I saw the bug report from shaktool, not sure if I should add anything to it... :)
comment:42 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Ok, the developer has asked that we read the file unix/PLATFORMS. The possibly relevant text I see in there says:
If you get an error message mentioning "handle_fault", then generational GC is not working. Add -DNO_GENERATIONAL_GC to the CFLAGS and recompile.
So we should try that. I'll attach a patch that does this. Could you apply it and let me know if it works?
Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | clisp.diff added |
---|
possible patch
comment:43 Changed 13 years ago by sammelweis@…
I patched the file /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/clisp/Portfile but unfortunately I again get a segmentation fault. Still I think the output was different than the previous time so will attach it.
Changed 13 years ago by sammelweis@…
Attachment: | main.log_after_patch added |
---|
Log file after applying suggested patch to clisp port file
comment:44 Changed 13 years ago by mhaeberli@…
Replying to ryandesign@…:
Please remember to use WikiFormatting and preview before posting so your entries are legible.
Also please note the difference between "clisp" and "clasp".
apologies - "clasp" was a typo for "clisp"
comment:45 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Ok sammelweis, so now you get a segfault without the handle_fault message.
Has anybody tried whether simply using clang instead of llvm-gcc-4.2 would help? Remove any changes to the portfile, then try:
sudo port clean clisp sudo port install clisp configure.compiler=clang
easieste wrote above with a patch to "use gcc-4.2 as opposed to the default clang" but the default on Xcode 4.1 is llvm-gcc-4.2; clang is not the default until Xcode 4.2 comes around.
Changed 13 years ago by sammelweis@…
Attachment: | main.log_clang added |
---|
Installing with sudo port install clisp configure.compiler=clang
comment:47 Changed 13 years ago by mhaeberli@…
Replying to sammelweis@…:
Still no luck, log attached again
I had same result; can provide log if useful.
comment:48 follow-ups: 49 51 Changed 13 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Builds fine for me after r84196. Apparently it's allergic to PIE.
comment:49 Changed 13 years ago by mhaeberli@…
comment:51 Changed 13 years ago by joaomlneto@…
comment:55 Changed 13 years ago by huquanjun@…
I encounted error similar to this one: sammelweis main.log_clang I changed Portfile to :
supported_archs ppc i386 x86_64
then it finally installed
mac osx 10.7.1 gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~18/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~18/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
comment:56 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | huquanjun@… added |
---|
huquanjun, this ticket is closed and resolved; we shouldn't be adding any more information to it.
Debug output for clisp build failure