Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#33446 closed defect (fixed)

sbcl 1.0.55 won't build with clang

Reported by: Ephaeton@… Owned by: easye
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: gwright@…, waqar@…, MartinBuchmann (Martin Buchmann), jesse.alama@…
Port: sbcl

Description

(yes I've seen the other sbcl tickets, none match the problem of this instance though)

The gist of it is:

:info:build unhandled SIMPLE-ERROR: The foreign symbol "find_page_index" is undefined.

in

:info:build obj/from-xc/src/code/room.lisp-obj
:info:build The foreign symbol table is:
:info:build "NXArgc" = #X  120130
(...)
:info:build "start" = #X  100DE0
:info:build unhandled SIMPLE-ERROR: The foreign symbol "find_page_index" is undefined.
:info:build 
:info:build 0: (SB-DEBUG::MAP-BACKTRACE
:info:build     #<CLOSURE (LAMBDA #) {142244D5}>
:info:build     :START
:info:build     0
:info:build     :COUNT
:info:build     128)
:info:build 1: (SB-DEBUG:BACKTRACE 128 #<SYNONYM-STREAM :SYMBOL SB-SYS:*STDERR* {100AC7B1}>)
:info:build 2: (SB-DEBUG::DEBUGGER-DISABLED-HOOK
:info:build     #<SIMPLE-ERROR "The foreign symbol ~S is undefined." {142231C9}>
:info:build     #<unavailable argument>)
:info:build 3: (SB-DEBUG::RUN-HOOK
:info:build     SB-EXT:*INVOKE-DEBUGGER-HOOK*
:info:build     #<SIMPLE-ERROR "The foreign symbol ~S is undefined." {142231C9}>)
:info:build 4: (INVOKE-DEBUGGER
:info:build     #<SIMPLE-ERROR "The foreign symbol ~S is undefined." {142231C9}>)
:info:build 5: (ERROR "The foreign symbol ~S is undefined." "find_page_index")
:info:build 6: (SB!FASL::COLD-FOREIGN-SYMBOL-ADDRESS "find_page_index")
:info:build 7: (SB!FASL::COLD-FOP-FOREIGN-FIXUP)
:info:build 8: (SB!FASL::LOAD-FASL-GROUP
:info:build     #<SB-SYS:FD-STREAM
:info:build       for "file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.55/obj/from-xc/src/code/room.lisp-obj"
:info:build       {1253CD31}>)
:info:build 9: (SB!FASL::LOAD-AS-FASL
:info:build     #<SB-SYS:FD-STREAM
:info:build       for "file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.55/obj/from-xc/src/code/room.lisp-obj"
:info:build       {1253CD31}>
:info:build     NIL
:info:build     #<unavailable argument>)
:info:build 10: (SB!FASL::COLD-LOAD #P"obj/from-xc/src/code/room.lisp-obj")
:info:build 11: (SB!VM:GENESIS
:info:build      :OBJECT-FILE-NAMES
:info:build      (#P"obj/from-xc/src/code/show.lisp-obj"
:info:build       #P"obj/from-xc/src/code/early-source-location.lisp-obj"
:info:build       #P"obj/from-xc/src/code/early-constants.lisp-obj"
:info:build       #P"obj/from-xc/src/code/backq.lisp-obj"
:info:build       #P"obj/from-xc/src/code/globals.lisp-obj" ...)
:info:build      :SYMBOL-TABLE-FILE-NAME
:info:build      "src/runtime/sbcl.nm"
:info:build      :CORE-FILE-NAME
:info:build      "output/cold-sbcl.core"
:info:build      :MAP-FILE-NAME
:info:build      "output/cold-sbcl.map"
:info:build      :C-HEADER-DIR-NAME
:info:build      "output/genesis-2")
:info:build 12: (SB-INT:SIMPLE-EVAL-IN-LEXENV
:info:build      (SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-OBJECT-FILE-NAMES*
:info:build                     :C-HEADER-DIR-NAME "output/genesis-2" ...)
:info:build      #<NULL-LEXENV>)
:info:build 13: (EVAL
:info:build      (SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-OBJECT-FILE-NAMES*
:info:build                     :C-HEADER-DIR-NAME "output/genesis-2" ...))
:info:build 14: (SB-EXT:INTERACTIVE-EVAL
:info:build      (SB!VM:GENESIS :OBJECT-FILE-NAMES *TARGET-OBJECT-FILE-NAMES*
:info:build                     :C-HEADER-DIR-NAME "output/genesis-2" ...)
:info:build      :EVAL
:info:build      NIL)
:info:build 15: (SB-IMPL::REPL-FUN NIL)
:info:build 16: ((LAMBDA ()))
:info:build 17: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {11A09B8D}>)
:info:build 18: (SB-IMPL::TOPLEVEL-REPL NIL)
:info:build 19: (SB-IMPL::TOPLEVEL-INIT)
:info:build 20: ((LABELS SB-IMPL::RESTART-LISP))
:info:build 
:info:build unhandled condition in --disable-debugger mode, quitting
:info:build shell command "ulimit -s 8192 && unset LD_PREBIND && unset LD_PREBIND_ALLOW_OVERLAP && cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.55 && export CC && CC=/usr/bin/clang && export CXX && CXX=/usr/bin/clang++ && export CPP && CPP== && sh ./make.sh "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.48-x86-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_sbcl/sbcl/work/sbcl-1.0.48-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null"  --prefix=/opt/local" returned error 1
: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 sbcl): org.macports.activate org.macports.build org.macports.destroot org.macports.install

Attachments (1)

main.log (3.8 MB) - added by Ephaeton@… 13 years ago.
sbcl build log file

Change History (18)

Changed 13 years ago by Ephaeton@…

Attachment: main.log added

sbcl build log file

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: gwright@… waqar@… added
Owner: changed from macports-tickets@… to easieste@…

comment:2 in reply to:  description ; Changed 13 years ago by gary.verhaegen@…

I have the exact same error. It happened for the first time when trying to update SBCL to 1.0.55_1 (from 1.0.55_0). I believe it should be noted that between 1.0.55_0 and 1.0.55_1 I updated XCode from 4.2 to 4.3, which might have something to do with this. I also want to point out that searching for that error on google yielded that message on the FreeBSD ML : http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2011-August/218311.html which does not seem to offer a solution, but at least the problem does not seem to be specific to Mac OS X (though that message does not specify which version of SBCL is affected).

comment:3 Changed 13 years ago by MartinBuchmann (Martin Buchmann)

Cc: Martin.Buchmann@… added

Cc Me!

comment:4 in reply to:  2 Changed 13 years ago by lasoniss@…

updated XCode from 4.2 to 4.3, which might have something to do with this.

I'm still using XCode 4.2 and I've encountered this bug.

comment:5 Changed 13 years ago by Ephaeton@…

Same here:

Developer Information:

  Version:	4.2.1 (4D502)
  Location:	/Developer
  Applications:
  Xcode:	4.2.1 (834)
  Instruments:	4.2 (4233)
  Dashcode:	3.0.2 (336)
  SDKs:
  Mac OS X:
  10.6:	(10K549)
  10.7:	(11C63)
  iPhone OS:
  5.0:	(9A334)
  iPhone Simulator:
  5.0:	(9A334)

comment:6 Changed 13 years ago by jxy (Xiao-Yong)

The default compiler breaks the compilation. Adding

configure.compiler llvm-gcc-4.2

to the Portfile solves the problem.

comment:7 Changed 13 years ago by easye

Resolution: fixed
Status: newclosed

Closing:

  1. Users of XCode 4.2 need to instruct the lang/sbcl Portfile to use the llvm-gcc-4.2 compiler as noted by jinxiaoyong. As a convenience the variant "use_llvm_gcc_4_2" currently exists to do this, but I suspect that this is a style violation of Portfile conventions, so it may be going away in the near future. As noted in UsingTheRightCompiler, this option should be settable at the invocation of the 'port' command via setting the CC environment variable, but I have not had enough time to test this path.
  2. Users of XCode 4.3 should see no problems. If this is the case, please file an additional bug.

comment:8 Changed 13 years ago by Ephaeton@…

IMHO user intervention should not be necessary. If we can figure out we have XCode 4.2, and we know it is going to be a problem, and we know that we can use llvm-gcc-4.2, then the package should automatically do so.

comment:9 Changed 13 years ago by jmroot (Joshua Root)

comment:10 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

The build fails in exactly the same way with Xcode 4.3.

comment:11 Changed 13 years ago by jmroot (Joshua Root)

Summary: sbcl 1.0.55 won't build on lionsbcl 1.0.55 won't build with clang

comment:12 Changed 13 years ago by jmroot (Joshua Root)

This may be the common problem of the code expecting to be compiled in gnu89 mode but clang defaulting to c99, thus having different semantics for the inline keyword. So the correct fix may be to add -std=gnu89 to the CFLAGS used. Falling back to llvm-gcc-4.2 from clang is OK as a stopgap measure if it takes a while to figure out how to do it the right way.

comment:13 Changed 13 years ago by lasoniss@…

Thank you for reopening.

While I was able to make the change suggested above to get sbcl to compile, when I next ran,

  port selfupdate
  port upgrade outdated

it tried to reinstall sbcl and the compile subsequently failed. As sbcl was the first on the list I then had to manually update everything else. This is undesired.

On a related note I don't seem to be able to find how to skip a port when doing an upgrade. Any help?

comment:14 Changed 13 years ago by jesse.alama@…

Cc: jesse.alama@… added

Cc Me!

comment:15 Changed 13 years ago by jmroot (Joshua Root)

comment:16 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

Workaround in r90498/r90504. Added a note to remove it when upstream implements a real fix, r90505.

comment:17 Changed 12 years ago by jmroot (Joshua Root)

Workaround removed in r95623, since the 1.0.56 release notes say the problem is fixed.

Note: See TracTickets for help on using tickets.