sarg FTBFS in impish

Bug #1933281 reported by Sergio Durigan Junior
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sarg (Ubuntu)
Fix Released
High
Sergio Durigan Junior

Bug Description

sarg currently FTBFS in impish:

...
/usr/bin/ld: readlog_common.o:./include/conf.h:314: multiple definition of `code2'; util.o:./include/conf.h:314: first defined here
/usr/bin/ld: readlog_common.o:./include/conf.h:313: multiple definition of `code'; util.o:./include/conf.h:313: first defined here
/usr/bin/ld: readlog_common.o:./include/conf.h:312: multiple definition of `period'; util.o:./include/conf.h:312: first defined here
/usr/bin/ld: readlog_common.o:./include/conf.h:311: multiple definition of `outdirname'; util.o:./include/conf.h:311: first defined here
/usr/bin/ld: readlog_common.o:./include/conf.h:310: multiple definition of `outdir'; util.o:./include/conf.h:310: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:78: sarg] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:17: build] Error 25

The full build log can be found here:

https://launchpadlibrarian.net/544878407/buildlog_ubuntu-impish-amd64.sarg_2.4.0-1ubuntu3_BUILDING.txt.gz

The failure happens because sarg:

1) *A lot* of the variable declarations in the source code happen inside the include/conf.h file. This is a very bad practice.

2) There is no proper use of "extern" in the source code, so all the variables declared in the header file above get re-declared every time the header is included. It's a mess.

Upstream will probably need to re-engineer the code in a massive way, which is not feasible/recommended on our side, so I came up with an ugly but functional hack that fixes the FTBFS without changing much. I will post the patch soon.

FWIW, sarg is one of the reverse dependencies of OpenLDAP, and is blocking the transition to OpenLDAP 2.5.5.

Tags: patch
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

This is the patch I mentioned in the description.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

There's also a PPA with the proposed package here:

https://launchpad.net/~sergiodj/+archive/ubuntu/sarg-ftbfs/+packages

tags: added: patch
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for the patch Sergio. I tried it locally and it indeed fixes the build issue.

I see some html code in the attached patch but I think it was just a small issue when you were creating this file, to do my test I removed those chunks.

LGTM, +1.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the review, Lucas. Indeed, when I downloaded the patch from paste.debian.net I forgot to use the "plain text" link; sorry about that.

Uploaded:

$ dput sarg_2.4.0-1ubuntu4_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/openldap/transition-impish/sarg/sarg_2.4.0-1ubuntu4_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/openldap/transition-impish/sarg/sarg_2.4.0-1ubuntu4.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading sarg_2.4.0-1ubuntu4.dsc: done.
  Uploading sarg_2.4.0-1ubuntu4.debian.tar.xz: done.
  Uploading sarg_2.4.0-1ubuntu4_source.buildinfo: done.
  Uploading sarg_2.4.0-1ubuntu4_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package sarg - 2.4.0-1ubuntu4

---------------
sarg (2.4.0-1ubuntu4) impish; urgency=medium

  * d/p/fix-multiple-include-conf.path: Fix FTBFS with GCC 10.3.
    (LP: #1933281)

 -- Sergio Durigan Junior <email address hidden> Tue, 22 Jun 2021 19:29:24 -0400

Changed in sarg (Ubuntu):
status: Confirmed → 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.