Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#55675 closed defect (fixed)

qpdf @7.0.0: build fails if qpdf @6.0.0 is active

Reported by: pmetzger (Perry E. Metzger) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qpdf

Description

qpdf is currently failing to build. main.log for the build attached.

Attachments (1)

qpdf-main.log (61.2 KB) - added by pmetzger (Perry E. Metzger) 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by pmetzger (Perry E. Metzger)

Attachment: qpdf-main.log added

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: qpdf fails to buildqpdf @7.0.0: build fails if qpdf @6.0.0 is active

Your log shows this problem:

:info:build Undefined symbols for architecture x86_64:
:info:build   "QUtil::string_to_int(char const*)", referenced from:
:info:build       _main in dct_compress.o
:info:build   "Pl_DCT::write(unsigned char*, unsigned long)", referenced from:
:info:build       _main in dct_compress.o
:info:build   "Pl_DCT::finish()", referenced from:
:info:build       _main in dct_compress.o
:info:build   "Pl_DCT::Pl_DCT(char const*, Pipeline*, unsigned int, unsigned int, int, J_COLOR_SPACE, Pl_DCT::CompressConfig*)", referenced from:
:info:build       _main in dct_compress.o
:info:build   "Pl_DCT::~Pl_DCT()", referenced from:
:info:build       _main in dct_compress.o
:info:build ld: symbol(s) not found for architecture x86_64

I can reproduce this problem, if qpdf @6.0.0 is installed and active when I try to build qpdf @7.0.0.

The build system puts the flags in the wrong order: -lqpdf -L/opt/local/lib -Llibqpdf/build. This means that the older libqpdf.dylib already installed in /opt/local/lib will be used in preference to the new one built in libqpdf/build, and the old one doesn't have all the symbols the new version does.

This problem should be reported to the developers of qpdf so that they can fix it. Until they do, we should add...

PortGroup conflicts_build 1.0
conflicts_build ${name}

...to the port to at least give the user a more helpful error message.

After you filed this ticket, our buildbot produced a binary archive of this port on High Sierra. So if you clean and try again, you should receive that. You can also work around the problem by using trace mode (sudo port -t upgrade qpdf) or by deactivating the old version of qpdf before trying to build the new one.

comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Looks like it's already been reported, and the correct fix has already been identified:

https://github.com/qpdf/qpdf/issues/158

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In 0bd12588b8d4f228d3812943ab2486ef123b2508/macports-ports:

qpdf: Fix build failure when old version is active

Closes: #55675

comment:4 Changed 6 years ago by Aaron Madlon-Kay <aaron@…>

In 48ce998c75ca5ee3b9296bbfa90856544c74ac7c/macports-ports:

qpdf: update to 7.1.0

Workaround for build issue no longer needed:
#55675

Note: See TracTickets for help on using tickets.