FTBFS: undefined reference (cups-pdf-3.0.1-2) [zesty/all arches]

Bug #1672101 reported by Tiago Stürmer Daitx
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups-pdf (Debian)
Fix Released
Unknown
cups-pdf (Ubuntu)
Fix Released
High
Unassigned

Bug Description

cups-pdf 3.0.1-2 currently FTBFS on Zesty on all arches. [1]

x86_64-linux-gnu-gcc -lcups -o src/cups-pdf src/cups-pdf.c -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro
/tmp/cc4NNYoz.o: In function `init':
./src/cups-pdf.c:359: undefined reference to `cupsBackendDeviceURI'
/tmp/cc4NNYoz.o: In function `read_config_ppd':
./src/cups-pdf.c:281: undefined reference to `ppdOpenFile'
./src/cups-pdf.c:286: undefined reference to `ppdMarkDefaults'
./src/cups-pdf.c:288: undefined reference to `ppdFirstOption'
./src/cups-pdf.c:291: undefined reference to `ppdNextOption'
./src/cups-pdf.c:293: undefined reference to `ppdClose'
/tmp/cc4NNYoz.o: In function `read_config_options':
./src/cups-pdf.c:304: undefined reference to `cupsParseOptions'
collect2: error: ld returned 1 exit status
debian/rules:20: recipe for target 'override_dh_auto_build-arch' failed
make[1]: *** [override_dh_auto_build-arch] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
debian/rules:26: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

The undefined references are caused by -lcups being set before the file
being compiled. Setting the cups library last during build fixes that.

[1] https://launchpad.net/ubuntu/+source/cups-pdf/3.0.1-2

Tags: ftbfs patch
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

FTBFS fix that sets the cups library as the last param to gcc.

The debdiff is between 3.0.1-3, so the changelog chunk will not apply cleanly to 3.0.1-2 (currently what has been synced from Debian), but it is an easy fix. I would recommend syncing zesty to cups-pdf 3.0.1-3 anyway.

tags: added: ftbfs
tags: added: patch
Mathew Hodson (mhodson)
Changed in cups-pdf (Ubuntu):
importance: Undecided → High
Revision history for this message
Bhavani Shankar (bhavi) wrote :

Uploaded with minor formatting changes in changelog

Thanks!

Changed in cups-pdf (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-pdf - 3.0.1-2ubuntu1

---------------
cups-pdf (3.0.1-2ubuntu1) zesty; urgency=medium

  * [rules]
    + Move cups library to the end to adhere to the standard POSIX-required
      behavior and avoid undefined references (Closes: #857500, LP: #1672101)

 -- Tiago Stürmer Daitx <email address hidden> Sat, 11 Mar 2017 22:52:43 +0000

Changed in cups-pdf (Ubuntu):
status: Fix Committed → Fix Released
Changed in cups-pdf (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.