Skip to content

Build fails on macOS with Xcode 13.0 (but passes with Xcode 12.5.1) #42346

@jonas-schulze

Description

@jonas-schulze
Contributor

Cloning and building Julia on the current master (5bf1ca5)

git clone ...
make

leads to

...
    JULIA usr/lib/julia/sys-o.a
/bin/sh: line 1: 11329 Segmentation fault: 11  JULIA_BINDIR=/Users/jonas/Projects/julia2/usr/bin WINEPATH="/Users/jonas/Projects/julia2/usr/bin;$WINEPATH" /Users/jonas/Projects/julia2/usr/bin/julia -O3 -C "native" --output-o /Users/jonas/Projects/julia2/usr/lib/julia/sys-o.a.tmp --startup-file=no --warn-overwrite=yes --sysimage /Users/jonas/Projects/julia2/usr/lib/julia/sys.ji /Users/jonas/Projects/julia2/contrib/generate_precompile.jl 1
*** This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: *** [/Users/jonas/Projects/julia2/usr/lib/julia/sys-o.a] Error 1
make: *** [julia-sysimg-release] Error 2

While working on my "old" clone, I encountered the same problem. make clean and make cleanall didn't fix the issue. I didn't try this on the new clone. I also tried creating a Make.user containing JULIA_PRECOMPILE=0, but that didn't work either.

I am running macOS 11.5.2 on a 2018 MacBook Pro. From my homebrew Julia installation:

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

Activity

vtjnash

vtjnash commented on Sep 22, 2021

@vtjnash
SponsorMember

It is likely you have something broken in your environment. Check env for something being added.

jonas-schulze

jonas-schulze commented on Sep 22, 2021

@jonas-schulze
ContributorAuthor

I don't see anything suspicious. 🙁

$ env | cut -d= -f1
TERM_SESSION_ID
SSH_AUTH_SOCK
LC_TERMINAL_VERSION
COLORFGBG
ITERM_PROFILE
SQLITE_EXEMPT_PATH_FROM_VNODE_GUARDS
XPC_FLAGS
LANG
PWD
SHELL
__CFBundleIdentifier
SECURITYSESSIONID
TERM_PROGRAM_VERSION
TERM_PROGRAM
PATH
DISPLAY
LC_TERMINAL
COLORTERM
COMMAND_MODE
TERM
HOME
TMPDIR
USER
XPC_SERVICE_NAME
LOGNAME
LaunchInstanceID
__CF_USER_TEXT_ENCODING
ITERM_SESSION_ID
SHLVL
OLDPWD
EDITOR
TEXINPUTS
JULIA_NUM_THREADS
JULIA_PROJECT
JULIA_PKG_PRECOMPILE_AUTO
PAGER
LESS
LSCOLORS
LC_CTYPE
FZF_DEFAULT_COMMAND
HOMEBREW_GITHUB_API_TOKEN
_

Edit: thanks for the quick response!

vtjnash

vtjnash commented on Sep 22, 2021

@vtjnash
SponsorMember

JULIA_NUM_THREADS -- the build does not support explicitly launching threads

DilumAluthge

DilumAluthge commented on Sep 23, 2021

@DilumAluthge
Member

This seems like an error on our end. If the build doesn't support JULIA_NUM_THREADS, then it should ignore it, instead of crashing.

DilumAluthge

DilumAluthge commented on Sep 23, 2021

@DilumAluthge
Member

I'm reopening this because I think we need to fix this on our end.

vilterp

vilterp commented on Sep 23, 2021

@vilterp
Contributor

For what it's worth, this happens to me even with JULIA_NUM_THREADS unset.

NHDaly

NHDaly commented on Sep 23, 2021

@NHDaly
SponsorMember

@vilterp and, it's worth mentioning, it only started happening to you today, on a build that was working up til yesterday.

DilumAluthge

DilumAluthge commented on Sep 23, 2021

@DilumAluthge
Member

@vilterp and, it's worth mentioning, it only started happening to you today, on a build that was working up til yesterday.

It would be great to bisect this.

added
bugIndicates an unexpected problem or unintended behavior
on Sep 23, 2021
DilumAluthge

DilumAluthge commented on Sep 23, 2021

@DilumAluthge
Member

I am not able to reproduce this locally with the following setup:

  1. macOS Big Sur version 11.6 (20G165)
  2. Xcode version 12.5.1 (12E507)

I tried both with and without export JULIA_NUM_THREADS=4, but I wasn't able to reproduce the build failure either way.

@jonas-schulze or @vilterp would you be able to git bisect this, since you are able reproduce this failure locally?

vilterp

vilterp commented on Sep 24, 2021

@vilterp
Contributor

The thing is, I am now unable to build commits which I was able to build before. It seems like some state on my system is corrupt, which is preventing the build from succeeding.

I tried make clean, make cleanall, and even deleted my checkout and restarted, but to no avail.

The only thing I can think of which changed from when it was working to now is that I used to only be building the C source, with make -C src and make -j julia-src-release.

Eventually, I made a change to the Julia source (this is all on #42286), and issued make. However, at the time, my C source had a bug in it, so building the sysimage failed. Once I fixed the bug on the C side, I ran into this bug, there the C and sysimage build, but some step afterward segfaults.

Is there some state outside of the julia checkout directory itself which could be corrupted, causing my failed builds?

21 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorbuildingBuild system, or building Julia or its dependenciessystem:macAffects only macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @vilterp@wookay@vtjnash@NHDaly@IanButterworth

      Issue actions

        Build fails on macOS with Xcode 13.0 (but passes with Xcode 12.5.1) · Issue #42346 · JuliaLang/julia