Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62465 closed defect (worksforme)

Building libheif-1.11.0 fails with a link error

Reported by: janflyborg Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: cjones051073 (Chris Jones)
Port: libheif

Description

When updating the libheif port I receive the following link error:

:info:build libtool: link: /usr/bin/clang++ -I.. -I../. -I/opt/local/include/libpng16 -pipe -Os -s
tdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.2.sdk -arch x86_64 -std=gn
u++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-er
ror=unused-parameter -Wno-error=deprecated-declarations -Wno-error=potentially-evaluated-expressio
n -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/Ma
cOSX11.2.sdk -arch x86_64 -o .libs/heif-convert heif_convert-encoder.o heif_convert-heif_convert.o
 heif_convert-encoder_y4m.o heif_convert-encoder_jpeg.o heif_convert-encoder_png.o  -L/opt/local/l
ib ../libheif/.libs/libheif.dylib -lde265 -lx265 -ldav1d -ljpeg -lpng16 -lpthread
:info:build Undefined symbols for architecture x86_64:
:info:build   "_jpeg_write_icc_profile", referenced from:
:info:build       JpegEncoder::Encode(heif_image_handle const*, heif_image const*, std::__1::basic
_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in heif_convert-enc
oder_jpeg.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [heif-convert] Error 1

Some dependency seems to be missing from this port.

Attachments (1)

main.log (177.7 KB) - added by janflyborg 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Cc: cjones051073 added
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

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

builds fine here.

You need to provide more details. Please post a complete log file from a clean build attempt.

Changed 4 years ago by janflyborg

Attachment: main.log added

comment:3 Changed 4 years ago by janflyborg

Thanks. I've attached the complete build log now.

comment:4 Changed 4 years ago by janflyborg

The missing symbol seems to be found in the port libjpeg-turbo. If I add the parameter -lturbojpeg to the linker, it links without problems (albeit with a warning about the SDK version).

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

Hmmm, I don't get why its failing for you. The build command is

info:build libtool: link: /usr/bin/clang++ -I.. -I../. -I/opt/local/include/libpng16 -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.2.sdk -arch x86_64 -std=gnu++11 -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=potentially-evaluated-expression -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.2.sdk -arch x86_64 -o .libs/heif-convert heif_convert-encoder.o heif_convert-heif_convert.o heif_convert-encoder_y4m.o heif_convert-encoder_jpeg.o heif_convert-encoder_png.o  -L/opt/local/lib ../libheif/.libs/libheif.dylib -lde265 -lx265 -ldav1d -ljpeg -lpng16 -lpthread
1638	:info:build Undefined symbols for architecture x86_64:
1639	:info:build   "_jpeg_write_icc_profile", referenced from:
1640	:info:build       JpegEncoder::Encode(heif_image_handle const*, heif_image const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in heif_convert-encoder_jpeg.o

so the above has -ljpeg which it should find in /opt/local/lib which is provided by the libjpeg-turbo port, and contains that symbol

 > nm -a /opt/local/lib/libjpeg.8.2.2.dylib | grep _jpeg_write_icc_profile
000000000000e701 T _jpeg_write_icc_profile

As I said, it all works as expected here...

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

Also, the build bots all had no issues

http://packages.macports.org/libheif/

Do you know why you are building from source, which you should be if you are installing to the normal prefix ? Is there anything 'special' about your build setup ?

Last edited 4 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:7 Changed 4 years ago by janflyborg

Thanks for the help. I tried uninstalling and cleaning libjpeg-turbo and then the same with libheif and now I cannot reproduce the problem. I'm closing this now.

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

Resolution: worksforme
Status: assignedclosed

comment:9 Changed 4 years ago by janflyborg

Don't know how to close, but maybe you can do it for me?

Note: See TracTickets for help on using tickets.