Skip to content

Can't build Julia on FreeBSD 12 with BinaryBuilder libuv #34627

@ararslan

Description

@ararslan
Member

I updated my FreeBSD system from 12.0 to 12.1, cleaned out my Julia clone (git clean -fdx) and rebuilt from scratch with the default options and no ccache. It seems there was a segfault while building the sysimage:

    LINK usr/lib/libjulia.so.1.5
ld: warning: found local symbol '__bss_start' in global part of symbol table in file /usr/home/alex/Projects/julia/usr/lib/libLLVM.so
ld: warning: found local symbol '_end' in global part of symbol table in file /usr/home/alex/Projects/julia/usr/lib/libLLVM.so
ld: warning: found local symbol '_edata' in global part of symbol table in file /usr/home/alex/Projects/julia/usr/lib/libLLVM.so
    CC ui/repl.o
    LINK usr/bin/julia
    JULIA usr/lib/julia/corecompiler.ji
gmake[1]: *** [sysimage.mk:61: /usr/home/alex/Projects/julia/usr/lib/julia/corecompiler.ji] Segmentation fault (core dumped)
gmake: *** [Makefile:81: julia-sysimg-ji] Error 2

The full build output can be found here. The system compiler is Clang 8.0.1 and the local GCC version is 9.2.0.

EDIT: Also note the LLVM deprecation messages during the build; I don't recall getting those on Linux or macOS.

Activity

added
bugIndicates an unexpected problem or unintended behavior
buildingBuild system, or building Julia or its dependencies
on Feb 2, 2020
ararslan

ararslan commented on Feb 2, 2020

@ararslan
MemberAuthor

Seems to build and work just fine if I rebuild with USE_BINARYBUILDER=0. A problem with the cross-compiled LLVM, maybe? @staticfloat?

ararslan

ararslan commented on Feb 2, 2020

@ararslan
MemberAuthor

Also, the nightly binaries as of fbc2c0a, version 1.5.0-DEV.221, seem to be operable AFAICT...

giordano

giordano commented on Feb 2, 2020

@giordano
Member

Any chance to find out which is the offending binary, maybe by using binary search? 😁

ararslan

ararslan commented on Feb 3, 2020

@ararslan
MemberAuthor

which is the offending binary

Not sure what you mean. Like which dependency is the problem?

giordano

giordano commented on Feb 3, 2020

@giordano
Member

Yes

staticfloat

staticfloat commented on Feb 3, 2020

@staticfloat
SponsorMember

Also, the nightly binaries as of fbc2c0a, version 1.5.0-DEV.221, seem to be operable AFAICT...

So you're saying the nightly binaries work, but you can't compile from source using BB deps?

ararslan

ararslan commented on Feb 3, 2020

@ararslan
MemberAuthor

Yes, exactly.

staticfloat

staticfloat commented on Feb 3, 2020

@staticfloat
SponsorMember

Can you run the bootstrap command in gdb or lldb to see where the segfault is coming from?

ararslan

ararslan commented on Feb 3, 2020

@ararslan
MemberAuthor

I'm not sure how exactly to do that. Any tips?

JeffBezanson

JeffBezanson commented on Feb 3, 2020

@JeffBezanson
SponsorMember

This should work:

cd base
gdb ../julia
(gdb) r --output-ji x compiler/compiler.jl
ararslan

ararslan commented on Apr 21, 2020

@ararslan
MemberAuthor
$ gdb ../julia
GNU gdb (GDB) 9.1 [GDB v9.1 for FreeBSD]
<...>
Reading symbols from ../julia...
(gdb) r --output-ji x compiler/compiler.jl
Starting program: /usr/home/alex/Projects/julia/julia --output-ji x compiler/compiler.jl
[New LWP 100768 of process 10478]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000080048c0c8 in uv__to_stat (src=0x7fffffffde10, dst=0x19) at src/unix/fs.c:1104
1104	src/unix/fs.c: No such file or directory.
(gdb) bt
#0  0x000000080048c0c8 in uv__to_stat (src=0x7fffffffde10, dst=0x19) at src/unix/fs.c:1104
#1  0x000000080048bdbf in uv__fs_stat (path=0x80000006400 <error: Cannot access memory at address 0x80000006400>, buf=0x19)
    at src/unix/fs.c:1260
#2  0x0000000000000000 in ?? ()
ararslan

ararslan commented on Apr 23, 2020

@ararslan
MemberAuthor

Looks like it could be an issue with the libuv provided by BinaryBuilder. Any suggestions for how to confirm?

6 remaining items

ararslan

ararslan commented on Mar 15, 2021

@ararslan
MemberAuthor

Yeah, unfortunately. The easiest fix is to dynamically link libuv.

added a commit that references this issue on Aug 18, 2021
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:freebsdAffects only FreeBSD

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @staticfloat@vtjnash@JeffBezanson@giordano@ararslan

        Issue actions

          Can't build Julia on FreeBSD 12 with BinaryBuilder libuv · Issue #34627 · JuliaLang/julia