New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #16888 (closed defect: invalid)

Opened 7 years ago

Last modified 5 years ago

sbcl-1.0.21 Build fails

Reported by: mforbes@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: sbcl x86_thread_state32_t x86-darwin-os.c Cc: waqar@…
Port: sbcl

Description

On 10.4.11 (32 bit intel), the build fails. There seem to be two problems:

1) The file x86-darwin-os.c contains references to the symbols

x86_thread_state32_t x86_float_state32_t x86_THREAD_STATE32 x86_FLOAT_STATE32

but these are undefined. I suspect that they are intended to be imported from mach/machine/thread_status.h, but that has instead

i386_thread_state_t i386_float_state_t i386_THREAD_STATE i386_FLOAT_STATE

I can get sbcl to build manually if I change these, however that leads to the second build problem. This looks like it might be a problem with sbcl, but perhaps a simple patch would do here... (Did these symbols change somewhere along the line? I could not find any documentation about this...)

2) When resuming a failed build, one obtains the error:

Error: Target org.macports.build returned: shell command "unset LD_PREBIND && unset LD_PREBIND_ALLOW_OVERLAP && sh make.sh "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_ports_lang_sbcl/work/sbcl-1.0.10-x86-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.10
-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" " returned error 127
Command output: make.sh: make.sh: No such file or directory

It seems that upon resuming a failed build (or manually trying to complete the build after making the previous changes), the build script does not change to the source directory (where make.sh is located) before trying to execute this. I am not sure exactly where this problem lies, but suspect it has to do with some aspect of the portfile. The peculiar thing is that it works for a fresh install after a clean, but not after a failure...

Relevant build logs attached below:

Output after port install clean then port -v install sbcl

--->  Fetching sbcl
--->  Verifying checksum(s) for sbcl
--->  Checksumming sbcl-1.0.21-Source.tar.bz2
--->  Checksumming sbcl-1.0.10-x86-darwin-binary.tar.bz2
--->  Extracting sbcl
--->  Extracting sbcl-1.0.21-source.tar.bz2
--->  Extracting sbcl-1.0.10-x86-darwin-binary.tar.bz2
--->  Applying patches to sbcl
--->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/sbcl/files/patch-use-mach-exception-handler.diff
patching file customize-target-features.lisp
--->  Configuring sbcl
--->  Building sbcl with target all
//starting build: Thu Oct 16 09:26:22 MDT 2008
//SBCL_XC_HOST="/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.10-x86-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.10-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null"
//entering make-config.sh
//ensuring the existence of output/ directory
//initializing /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.21/local-target-features.lisp-expr
//guessing default target CPU architecture from host architecture
//setting up CPU-architecture-dependent information
sbcl_arch="x86"
//setting up symlink src/compiler/target
//setting up symlink src/assembly/target
//setting up symlink src/compiler/assembly
//setting up OS-dependent information
//finishing /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.21/local-target-features.lisp-expr
/in canonicalize-whitespace-1
/$*=./customize-target-features.lisp ./local-target-features.lisp-expr ./tests/test-status.lisp-expr ./contrib/sb-bsd-sockets/foo.c ./contrib/sb-posix/foo.c ./src/runtime/runtime.c ./src/runtime/target-arch-os.h ./src/runtime/target-arch.h ./src/runtime/target-lispregs.h ./src/runtime/target-os.h
/$scratchfilename=/tmp/canonicalize-whitespace-1.3543.tmp
//entering make-host-1.sh
//building cross-compiler, and doing first genesis
This is SBCL 1.0.10, an implementation of ANSI Common Lisp.
... <snip lots of LISP output here>...
//entering make-target-1.sh
//building runtime system and symbol table file
rm -f *.[do] sbcl sbcl.nm sbcl.h core *.tmp 
echo '#include "genesis/config.h"' >sbcl.h
echo '#include "genesis/constants.h"' >>sbcl.h
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o alloc.o alloc.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o backtrace.o backtrace.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o breakpoint.o breakpoint.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o coreparse.o coreparse.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o dynbind.o dynbind.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o funcall.o funcall.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o gc-common.o gc-common.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o globals.o globals.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o interr.o interr.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o interrupt.o interrupt.c
interrupt.c: In function 'arrange_return_to_lisp_function':
interrupt.c:865: warning: unused variable 'sp'
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o largefile.o largefile.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o monitor.o monitor.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o os-common.o os-common.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o parse.o parse.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o print.o print.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o purify.o purify.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o pthread-futex.o pthread-futex.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o pthread-lutex.o pthread-lutex.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o regnames.o regnames.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o run-program.o run-program.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o runtime.o runtime.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o save.o save.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o search.o search.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o thread.o thread.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o time.o time.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o util.o util.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o validate.o validate.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o vars.o vars.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o wrap.o wrap.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o x86-arch.o x86-arch.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o bsd-os.o bsd-os.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o x86-bsd-os.o x86-bsd-os.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o darwin-os.o darwin-os.c
gcc -g -Wall -O2 -fdollars-in-identifiers -I. -no-cpp-precomp  -c -o x86-darwin-os.o x86-darwin-os.c
x86-darwin-os.c:134: error: parse error before 'x86_thread_state32_t'
x86-darwin-os.c: In function 'build_fake_signal_context':
x86-darwin-os.c:136: error: 'context' undeclared (first use in this function)
x86-darwin-os.c:136: error: (Each undeclared identifier is reported only once
x86-darwin-os.c:136: error: for each function it appears in.)
x86-darwin-os.c:137: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c:138: error: 'float_state' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:143: error: parse error before '*' token
x86-darwin-os.c: In function 'update_thread_state_from_context':
x86-darwin-os.c:146: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c:146: error: 'context' undeclared (first use in this function)
x86-darwin-os.c:147: error: 'float_state' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:152: error: parse error before 'x86_thread_state32_t'
x86-darwin-os.c: In function 'push_context':
x86-darwin-os.c:156: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c:157: error: 'data' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:161: error: parse error before '*' token
x86-darwin-os.c: In function 'align_context_stack':
x86-darwin-os.c:165: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:175: error: parse error before '*' token
x86-darwin-os.c: In function 'open_stack_allocation':
x86-darwin-os.c:179: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:190: error: parse error before '*' token
x86-darwin-os.c: In function 'stack_allocate':
x86-darwin-os.c:193: error: 'size' undeclared (first use in this function)
x86-darwin-os.c:195: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c: At top level:
x86-darwin-os.c:205: error: parse error before '*' token
x86-darwin-os.c: In function 'call_c_function_in_context':
x86-darwin-os.c:215: error: 'thread_state' undeclared (first use in this function)
x86-darwin-os.c:218: error: 'nargs' undeclared (first use in this function)
x86-darwin-os.c:233: error: 'function' undeclared (first use in this function)
x86-darwin-os.c:225: error: 'va_start' used in function with fixed args
x86-darwin-os.c: At top level:
x86-darwin-os.c:236: error: parse error before '*' token
x86-darwin-os.c:240: error: parse error before ')' token
x86-darwin-os.c:263: warning: type defaults to 'int' in declaration of 'context'
x86-darwin-os.c:263: warning: initialization makes integer from pointer without a cast
x86-darwin-os.c:263: error: initializer element is not constant
x86-darwin-os.c:263: warning: data definition has no type or storage class
x86-darwin-os.c:267: warning: type defaults to 'int' in declaration of 'regs'
x86-darwin-os.c:267: error: conflicting types for 'regs'
x86-darwin-os.c:260: error: previous declaration of 'regs' was here
x86-darwin-os.c:267: warning: initialization makes integer from pointer without a cast
x86-darwin-os.c:267: error: initializer element is not constant
x86-darwin-os.c:267: warning: data definition has no type or storage class
x86-darwin-os.c:269: error: parse error before '->' token
x86-darwin-os.c:279: warning: type defaults to 'int' in declaration of 'build_fake_signal_context'
x86-darwin-os.c:279: warning: parameter names (without types) in function declaration
x86-darwin-os.c:279: error: conflicting types for 'build_fake_signal_context'
x86-darwin-os.c:135: error: previous definition of 'build_fake_signal_context' was here
x86-darwin-os.c:279: warning: data definition has no type or storage class
x86-darwin-os.c:281: warning: type defaults to 'int' in declaration of 'block_blockable_signals'
x86-darwin-os.c:281: error: conflicting types for 'block_blockable_signals'
interrupt.h:117: error: previous declaration of 'block_blockable_signals' was here
x86-darwin-os.c:281: warning: data definition has no type or storage class
x86-darwin-os.c:283: warning: type defaults to 'int' in declaration of 'handler'
x86-darwin-os.c:283: warning: parameter names (without types) in function declaration
x86-darwin-os.c:283: warning: data definition has no type or storage class
x86-darwin-os.c:285: warning: type defaults to 'int' in declaration of 'update_thread_state_from_context'
x86-darwin-os.c:285: warning: parameter names (without types) in function declaration
x86-darwin-os.c:285: error: conflicting types for 'update_thread_state_from_context'
x86-darwin-os.c:145: error: previous definition of 'update_thread_state_from_context' was here
x86-darwin-os.c:285: warning: data definition has no type or storage class
x86-darwin-os.c:287: error: parse error before '(' token
x86-darwin-os.c:287: warning: type defaults to 'int' in declaration of 'context'
x86-darwin-os.c:291: error: parse error before '(' token
x86-darwin-os.c:291: warning: type defaults to 'int' in declaration of 'regs'
x86-darwin-os.c:291: error: conflicting types for 'regs'
x86-darwin-os.c:260: error: previous declaration of 'regs' was here
x86-darwin-os.c:296: error: parse error before string constant
x86-darwin-os.c:301: error: parse error before 'x86_thread_state32_t'
x86-darwin-os.c:304: error: parse error before ')' token
x86-darwin-os.c:307: warning: type defaults to 'int' in declaration of 'save_thread_state'
x86-darwin-os.c:307: warning: data definition has no type or storage class
x86-darwin-os.c:308: error: parse error before '*' token
x86-darwin-os.c:308: warning: type defaults to 'int' in declaration of 'save_float_state'
x86-darwin-os.c:308: warning: data definition has no type or storage class
x86-darwin-os.c:313: warning: type defaults to 'int' in declaration of 'new_state'
x86-darwin-os.c:313: error: 'thread_state' undeclared here (not in a function)
x86-darwin-os.c:313: warning: data definition has no type or storage class
x86-darwin-os.c:314: error: parse error before '&' token
x86-darwin-os.c:314: warning: type defaults to 'int' in declaration of 'open_stack_allocation'
x86-darwin-os.c:314: error: conflicting types for 'open_stack_allocation'
x86-darwin-os.c:176: error: previous definition of 'open_stack_allocation' was here
x86-darwin-os.c:314: warning: data definition has no type or storage class
x86-darwin-os.c:315: error: parse error before '&' token
x86-darwin-os.c:315: warning: type defaults to 'int' in declaration of 'stack_allocate'
x86-darwin-os.c:315: error: conflicting types for 'stack_allocate'
x86-darwin-os.c:191: error: previous definition of 'stack_allocate' was here
x86-darwin-os.c:315: warning: data definition has no type or storage class
x86-darwin-os.c:317: warning: type defaults to 'int' in declaration of 'save_thread_state'
x86-darwin-os.c:317: error: conflicting types for 'save_thread_state'
x86-darwin-os.c:307: error: previous declaration of 'save_thread_state' was here
x86-darwin-os.c:317: error: 'x86_thread_state32_t' undeclared here (not in a function)
x86-darwin-os.c:317: error: parse error before ')' token
x86-darwin-os.c:318: warning: type defaults to 'int' in declaration of 'save_thread_state'
x86-darwin-os.c:318: warning: data definition has no type or storage class
x86-darwin-os.c:320: warning: type defaults to 'int' in declaration of 'save_float_state'
x86-darwin-os.c:320: error: conflicting types for 'save_float_state'
x86-darwin-os.c:308: error: previous declaration of 'save_float_state' was here
x86-darwin-os.c:320: error: 'x86_float_state32_t' undeclared here (not in a function)
x86-darwin-os.c:320: error: parse error before ')' token
x86-darwin-os.c:321: warning: type defaults to 'int' in declaration of 'state_count'
x86-darwin-os.c:321: error: conflicting types for 'state_count'
x86-darwin-os.c:309: error: previous declaration of 'state_count' was here
x86-darwin-os.c:321: error: 'x86_FLOAT_STATE32_COUNT' undeclared here (not in a function)
x86-darwin-os.c:321: warning: data definition has no type or storage class
x86-darwin-os.c:322: error: parse error before 'if'
x86-darwin-os.c:328: warning: type defaults to 'int' in declaration of 'save_siginfo'
x86-darwin-os.c:328: error: conflicting types for 'save_siginfo'
x86-darwin-os.c:310: error: previous declaration of 'save_siginfo' was here
x86-darwin-os.c:328: error: 'siginfo' undeclared here (not in a function)
x86-darwin-os.c:328: error: initializer element is not constant
x86-darwin-os.c:328: warning: data definition has no type or storage class
x86-darwin-os.c:329: error: parse error before 'if'
x86-darwin-os.c:334: error: parse error before '&' token
x86-darwin-os.c:341: warning: type defaults to 'int' in declaration of 'call_c_function_in_context'
x86-darwin-os.c:341: error: conflicting types for 'call_c_function_in_context'
x86-darwin-os.c:209: error: previous definition of 'call_c_function_in_context' was here
x86-darwin-os.c:341: warning: data definition has no type or storage class
x86-darwin-os.c:343: warning: type defaults to 'int' in declaration of 'state_count'
x86-darwin-os.c:343: error: conflicting types for 'state_count'
x86-darwin-os.c:309: error: previous declaration of 'state_count' was here
x86-darwin-os.c:343: error: 'x86_THREAD_STATE32_COUNT' undeclared here (not in a function)
x86-darwin-os.c:343: warning: data definition has no type or storage class
x86-darwin-os.c:344: error: parse error before 'if'
x86-darwin-os.c: In function 'catch_exception_raise':
x86-darwin-os.c:410: error: parse error before 'thread_state'
x86-darwin-os.c:426: error: 'x86_THREAD_STATE32' undeclared (first use in this function)
x86-darwin-os.c:502: error: 'x86_FLOAT_STATE32' undeclared (first use in this function)
x86-darwin-os.c:518: warning: implicit declaration of function 'call_handler_on_thread'
x86-darwin-os.c:416: warning: unused variable 'region_name'
x86-darwin-os.c:415: warning: unused variable 'info_count'
x86-darwin-os.c:414: warning: unused variable 'region_info'
x86-darwin-os.c:413: warning: unused variable 'region_size'
x86-darwin-os.c:412: warning: unused variable 'region_addr'
make: *** [x86-darwin-os.o] Error 1
Warning: the following items did not execute (for sbcl): org.macports.activate org.macports.build org.macports.destroot org.macports.install

Output after trying to rebuild (after changing source file as discussed above)

--->  Building sbcl with target all
make.sh: make.sh: No such file or directory
Error: Target org.macports.build returned: shell command "unset LD_PREBIND && unset LD_PREBIND_ALLOW_OVERLAP && sh make.sh "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.10-x86-darwin/src/runtime/sbcl --core /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_sbcl/work/sbcl-1.0.10-x86-darwin/output/sbcl.core --disable-debugger --sysinit /dev/null --userinit /dev/null" " returned error 127
Command output: make.sh: make.sh: No such file or directory

Warning: the following items did not execute (for sbcl): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Change History

comment:1 Changed 7 years ago by macsforever2000@…

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

Assigning to maintainers.

comment:2 Changed 6 years ago by gwright@…

  • Status changed from new to assigned

Does this still happen on 1.0.22?

comment:3 Changed 6 years ago by mforbes@…

Yes. This problem still remains.

comment:4 Changed 6 years ago by gwright@…

What version of Xcode do you have? (Look at /Developer/Applications/Xcode.app/Contents/version.plist.)

You should also report this as a bug in SBCL since it doesn't seem to be caused by the MacPorts build; rather, it looks as if only i386/Leopard builds properly.

comment:5 follow-up: ↓ 6 Changed 6 years ago by mforbes@…

Version 2.5 (BuildVersion 2, CFBundleShortVersionString 2.5, CFBundleVersion 799, SourceVersion 7990000)

The first issue does look like an sbcl problem, but the second issue (not finding make.sh after failure) should be fixed at the portfile level. If this were fixed, then I could patch the sources manually and continue. As it stands, I can patch them manually, but then can't resume the port install because of problem 2)

Is there any way of including a patch with the portfile? If so, I could write one to tide us over, especially if this is only a problem on Tiger.

Has anyone been able to verify this? I would like to confirm that it is not just something strange with my setup. If so, I will send a report to SBCL.

comment:6 in reply to: ↑ 5 Changed 6 years ago by gwright@…

Replying to mforbes@…:

Version 2.5 (BuildVersion 2, CFBundleShortVersionString 2.5, CFBundleVersion 799, SourceVersion 7990000)

The first issue does look like an sbcl problem, but the second issue (not finding make.sh after failure) should be fixed at the portfile level. If this were fixed, then I could patch the sources manually and continue. As it stands, I can patch them manually, but then can't resume the port install because of problem 2)

Is there any way of including a patch with the portfile? If so, I could write one to tide us over, especially if this is only a problem on Tiger.

Has anyone been able to verify this? I would like to confirm that it is not just something strange with my setup. If so, I will send a report to SBCL.

After a build failure, you need to run

$ sudo port clean sbcl

to cleanly restart the build. This will take care of the make.sh issue. There's no general way to deal with failed builds under macports since there are so many different build procedures. Arguably the port command should drop a hidden file into the build directory and delete it if the build succeeds. If you ever start a build and the hidden file is present, the port command could automatically do a clean.

To include patch files, in the port file you need to add:

patchfiles    <name_of_patchfile>

and create a new directory in the port directory called "files/" which will contain the patches.

If you can send me the patch you want to add, I can make the change to the portfile.

comment:7 Changed 6 years ago by anonymous

  • Milestone Port Bugs deleted

Milestone Port Bugs deleted

comment:8 Changed 5 years ago by snc@…

  • Status changed from assigned to closed
  • Resolution set to invalid

Closing for inactivity, and being many versions behind.

Note: See TracTickets for help on using tickets.