Build is broken on ppc64: 32-bit target is forced

Open
#958 7 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
build-system

Research direction

Start by tracing the tppc32osx build configuration and the compiler flags shown in the log, especially where PPC32 and the 32-bit size settings are selected. Check how the build chooses architecture settings for ppc64, then verify that the resulting build uses matching target settings and completes the failing build steps.

Written by the indexing model from the issue text.

Description

The build does not work on ppc64: apparently 32-bit target is forced, which, unsurprisingly, fails:

/usr/bin/gcc-4.2 -I/opt/local/include -DPPC32 -Itppc32osx/boot/tppc32osx -Itppc32osx/c -Ic/ -pipe -Os -arch ppc64 -o tppc32osx/c/random.o -c c/random.c
/usr/bin/gcc-4.2 -I/opt/local/include -DPPC32 -Itppc32osx/boot/tppc32osx -Itppc32osx/c -Ic/ -pipe -Os -arch ppc64 -o tppc32osx/c/ffi.o -c c/ffi.c
/usr/bin/gcc-4.2 -I/opt/local/include -DPPC32 -Itppc32osx/boot/tppc32osx -Itppc32osx/c -Ic/ -pipe -Os -arch ppc64 -o tppc32osx/c/self-exe.o -c c/self-exe.c
/usr/bin/gcc-4.2 -I/opt/local/include -DPPC32 -Itppc32osx/boot/tppc32osx -Itppc32osx/c -Ic/ -pipe -Os -arch ppc64 -o tppc32osx/c/ppc32.o -c c/ppc32.c
ar rc tppc32osx/boot/tppc32osx/libkernel.a tppc32osx/c/statics.o tppc32osx/c/segment.o tppc32osx/c/alloc.o tppc32osx/c/symbol.o tppc32osx/c/intern.o tppc32osx/c/gcwrapper.o tppc32osx/c/gc-011.o tppc32osx/c/gc-par.o tppc32osx/c/gc-ocd.o tppc32osx/c/gc-oce.o tppc32osx/c/number.o tppc32osx/c/schsig.o tppc32osx/c/io.o tppc32osx/c/new-io.o tppc32osx/c/print.o tppc32osx/c/fasl.o tppc32osx/c/vfasl.o tppc32osx/c/stats.o tppc32osx/c/foreign.o tppc32osx/c/prim.o tppc32osx/c/prim5.o tppc32osx/c/flushcache.o tppc32osx/c/schlib.o tppc32osx/c/thread.o tppc32osx/c/expeditor.o tppc32osx/c/scheme.o tppc32osx/c/compress-io.o tppc32osx/c/random.o tppc32osx/c/ffi.o tppc32osx/c/self-exe.o tppc32osx/c/ppc32.o
ranlib: file: tppc32osx/boot/tppc32osx/libkernel.a(ffi.o) has no symbols
/usr/bin/gcc-4.2 -pipe -Os -arch ppc64 -o tppc32osx/bin/tppc32osx/scheme tppc32osx/boot/tppc32osx/main.o tppc32osx/boot/tppc32osx/libkernel.a -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc64 -liconv -lm -lncurses -lz -llz4
: tppc32osx/bin/tppc32osx/scheme
running tppc32osx/bin/tppc32osx/scheme to build tppc32osx/s/cmacros.so
running tppc32osx/bin/tppc32osx/scheme to build tppc32osx/s/nanopass.so
sizeof(ptr) * 8 [8] != ptr_bits [32]
sizeof(long) * 8 [8] != long_bits [32]
sizeof(size_t) * 8 [8] != size_t_bits [32]
sizeof(ssize_t) * 8 [8] != size_t_bits [32]
sizeof(ptrdiff_t) * 8 [8] != ptrdiff_t_bits [32]
sizeof(ptr) * 8 [8] != ptr_bits [32]
sizeof(long) * 8 [8] != long_bits [32]
sizeof(size_t) * 8 [8] != size_t_bits [32]
sizeof(ssize_t) * 8 [8] != size_t_bits [32]
sizeof(ptrdiff_t) * 8 [8] != ptrdiff_t_bits [32]
failed
 in build-one
 in loop
 in module->hash
make: *** [build] Error 1
Dominant language
Scheme
Stars
7.4k
Forks
1k
Avg merge
1d 20h
Merged PRs (30d)
19

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cisco/ChezScheme

All issues in cisco/ChezScheme

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.