Opened 4 years ago

Closed 2 years ago

#62836 closed defect (fixed)

rav1e @0.4.1 error: Undefined symbols for architecture x86_64: "_linkat"

Reported by: cave-canem Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc: cjones051073 (Chris Jones), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), cave-canem, Dave-Allured (Dave Allured), catap (Kirill A. Korinsky)
Port: rav1e

Description (last modified by cave-canem)

uname -sr
Darwin 13.4.0

port outdated; port installed legacy-support and active ; port installed rust and active; sudo port -kvd install rav1e
No installed ports are outdated.
The following ports are currently installed:
  legacy-support @1.0.1_0 (active)
The following ports are currently installed:
  rust @1.52.0_0 (active)
...
--->  Attempting to fetch rav1e-0.4.1.tar.gz from https://distfiles.macports.org/cargo-crates
...
Compiling noop_proc_macro v0.3.0
error: linking with `/opt/MacPorts/libexec/rust-compiler-wrap/bin/ld-rust` failed: exit code: 1
...
 = note: Undefined symbols for architecture x86_64:
            "_linkat", referenced from:
                std::sys::unix::fs::link::h5d728007969d6342 in libstd-85717d025629e453.rlib(std-85717d025629e453.std.7r7pgl85-cgu.9.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

error: could not compile `noop_proc_macro`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
Error: CliError { error: Some(build failed), exit_code: 101 }
Command failed: /opt/MacPorts/bin/cargo cbuild --release --frozen --prefix /opt/MacPorts --destdir /opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_rav1e/rav1e/work/destroot
Exit code: 1
Error: Failed to build rav1e: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
    while executing
"$post $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_multimedia_rav1e/rav1e/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port rav1e failed

See attached log with debug information.

Attachments (4)

main.log.tar.xz (24.7 KB) - added by cave-canem 4 years ago.
main.log
rav1e_with_rust-compiler-wrap_1.52.0_1.main.log.tar.xz (23.5 KB) - added by cave-canem 4 years ago.
rav1e_with_rust-compiler-wrap_1.52.0_1.main.log.tar.xz
rav1e_with_rust-compiler-wrap_1.52.0_2.main.log.tar.xz (22.8 KB) - added by cave-canem 4 years ago.
rav1e_with_rust-compiler-wrap_1.52.0_2.main.log.tar.xz
rav1e_with_rust-compiler-wrap_1.52.1_0.main.log.tar.xz (23.0 KB) - added by cave-canem 4 years ago.
rav1e_with_rust-compiler-wrap_1.52.1_0.main.log.tar.xz

Download all attachments as: .zip

Change History (17)

Changed 4 years ago by cave-canem

Attachment: main.log.tar.xz added

main.log

comment:1 Changed 4 years ago by cave-canem

Description: modified (diff)

comment:2 Changed 4 years ago by cjones051073 (Chris Jones)

yeah, looks like the legacy support isn't quite working here as that should be providing that symbol....

comment:3 Changed 4 years ago by cjones051073 (Chris Jones)

OK, what appears to be happening here is the rust/cargo build system doesn't propagate the environment variables to the processes it spawns for the underlying linking, and the wrappers rely on this to insert the legacy support flags. I'll have to see if there is an alternative option.

comment:4 Changed 4 years ago by cave-canem

Trying to build "rav1e" with "rust-compiler-wrap @ 1.52.0_1":

sudo port -vd install rav1e
...
DEBUG: rust-compiler-wrap 1.52.0_2 exists in the ports tree
DEBUG: rust-compiler-wrap 1.52.0_2  is the latest installed
DEBUG: rust-compiler-wrap 1.52.0_1  is active
...
Building pkg-config file
    Building header file using cbindgen
fatal runtime error: failed to initiate panic, error 5
Command failed: /opt/MacPorts/bin/cargo cbuild --release --frozen --prefix /opt/MacPorts --destdir /opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_rav1e/rav1e/work/destroot
Killed by signal: 6
Error: Failed to build rav1e: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
    while executing
"$post $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_multimedia_rav1e/rav1e/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port rav1e failed

See attached log file "rav1e_with_rust-compiler-wrap_1.52.0_1.main.log.tar.xz" with debug information.

Trying to build "rav1e" with "rust-compiler-wrap @ 1.52.0_2":

sudo port -vd install rav1e
...
DEBUG: rust-compiler-wrap 1.52.0_2 exists in the ports tree
DEBUG: rust-compiler-wrap 1.52.0_2  is the latest installed
DEBUG: rust-compiler-wrap 1.52.0_2  is active
...
 = note: Undefined symbols for architecture x86_64:
            "_linkat", referenced from:
                std::sys::unix::fs::link::h5d728007969d6342 in libstd-85717d025629e453.rlib(std-85717d025629e453.std.7r7pgl85-cgu.9.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

Error: CliError { error: Some(build failed), exit_code: 101 }
Command failed: /opt/MacPorts/bin/cargo cbuild --release --frozen --prefix /opt/MacPorts --destdir /opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_rav1e/rav1e/work/destroot
Exit code: 1
Error: Failed to build rav1e: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
    while executing
"$post $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_multimedia_rav1e/rav1e/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port rav1e failed

See attached log file "rav1e_with_rust-compiler-wrap_1.52.0_2.main.log.tar.xz" with debug information.

Changed 4 years ago by cave-canem

rav1e_with_rust-compiler-wrap_1.52.0_1.main.log.tar.xz

comment:5 Changed 4 years ago by cjones051073 (Chris Jones)

yep, I had to revert the changes that should have fixed this as rust is currently falling to build at all on <macOS13. I need to get them building again before seeing if this can be resolved.

Changed 4 years ago by cave-canem

rav1e_with_rust-compiler-wrap_1.52.0_2.main.log.tar.xz

comment:6 Changed 4 years ago by cave-canem

Cc: cave-canem added

comment:7 Changed 4 years ago by kencu (Ken)

There is only one port in the 25,000 ports that depends on rav1e, libheif, and it doesn't actually need it for anything.

Just delete that dep from libheif and you're on your way ;>

comment:8 Changed 4 years ago by cjones051073 (Chris Jones)

I hope to have this fixed soon....

comment:9 Changed 4 years ago by cjones051073 (Chris Jones)

I'm afraid it is looking like it might be tough to get rust based ports building with legacy support features like this. I can get past the error above but then it fails in other ways, that look like rust really doesn't like it...

anyway, libheif already does not need rav1e on older systems

https://github.com/macports/macports-ports/commit/aebe51e3cd62e27205f1a41df8ab0668395cf73b

so nothing in macports depends on it on macOS10.9...

comment:10 Changed 4 years ago by kencu (Ken)

even if it was fixed, it can't build universal...this is one of those cases where we generate a huge fuss to fix a problem that was not a problem for 99.9% of people.

It should be disabled from libheif on < 10.14.

comment:11 Changed 4 years ago by cave-canem

for Herby Gillot:

port installed rust and active
The following ports are currently installed:
  rust @1.52.1_0 (active)

sudo port -vd install rav1e
...
DEBUG: rust-compiler-wrap 1.52.1_0 exists in the ports tree
DEBUG: rust-compiler-wrap 1.52.1_0  is the latest installed
DEBUG: rust-compiler-wrap 1.52.1_0  is active
...
 = note: Undefined symbols for architecture x86_64:
            "_linkat", referenced from:
                std::sys::unix::fs::link::h60bbe8130910d216 in libstd-351eea491abe4434.rlib(std-351eea491abe4434.std.chajk4hm-cgu.9.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: aborting due to previous error

error: could not compile `noop_proc_macro`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
Error: CliError { error: Some(build failed), exit_code: 101 }
Command failed: /opt/MacPorts/bin/cargo cbuild --release --frozen --prefix /opt/MacPorts --destdir /opt/MacPorts/var/macports/build/_opt_macports-ports_multimedia_rav1e/rav1e/work/destroot
Exit code: 1
Error: Failed to build rav1e: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: command execution failed
    while executing
"$post $targetname"
Error: See /opt/MacPorts/var/macports/logs/_opt_macports-ports_multimedia_rav1e/rav1e/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port rav1e failed

See attached log file "rav1e_with_rust-compiler-wrap_1.52.1_0.main.log.tar.xz" with debug information.

Changed 4 years ago by cave-canem

rav1e_with_rust-compiler-wrap_1.52.1_0.main.log.tar.xz

comment:12 Changed 3 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:13 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: catap added
Resolution: fixed
Status: newclosed

rav1e is now supported down to 10.6, thanks to rust-related work by Marcus and Kirill. (Recent build failures for 10.6 are due to a temporary issue with cargo-c, which we hope to fix soon.)

Closing as fixed.

Note: See TracTickets for help on using tickets.