Bug 1417549 - /usr/bin/x86_64-linux-gnu-ld.bfd.real: ../common/progress/.libs/libprogress.a(libprogress_la-progress.o): undefined reference to symbol 'UP@@NCURSES_TINFO_5.0.19991023'
Summary: /usr/bin/x86_64-linux-gnu-ld.bfd.real: ../common/progress/.libs/libprogress.a...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-30 09:02 UTC by jean-christophe manciot
Modified: 2017-02-16 13:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 09:58:10 UTC


Attachments (Terms of Use)
Full build log (403.57 KB, text/plain)
2017-01-30 09:02 UTC, jean-christophe manciot
no flags Details
0001-fish-Link-to-libtinfo-RHBZ-1417549.patch (985 bytes, patch)
2017-01-31 08:45 UTC, Richard W.M. Jones
no flags Details | Diff

Description jean-christophe manciot 2017-01-30 09:02:46 UTC
Created attachment 1245778 [details]
Full build log

Description of problem:
----------------------
Error while compiling git sources v1.35.20

How reproducible:
----------------
        echo --------
        echo Cleaning
        echo --------
        cd git-libguestfs
        sudo -u actionmystique -H git-reset-clean-pull-checkout.sh $branch $tag

        echo -----------
        echo Configuring
        echo -----------
        export NOCONFIGURE=yes
        ./autogen.sh
        ./configure   --build=x86_64-pc-linux-gnu \
                      --enable-fuse \
                      --enable-golang \
                      --prefix=/usr --sysconfdir=/etc --localstatedir=/var

        echo ---------
        echo Compiling
        echo ---------
        make

Actual results:
--------------
...
Making all in fish
make[2]: Entering directory '/home/actionmystique/Program-Files/Ubuntu/Libguestfs/git-libguestfs/fish'
make  all-am
make[3]: Entering directory '/home/actionmystique/Program-Files/Ubuntu/Libguestfs/git-libguestfs/fish'
  CCLD     guestfish
/usr/bin/x86_64-linux-gnu-ld.bfd.real: ../common/progress/.libs/libprogress.a(libprogress_la-progress.o): undefined reference to symbol 'UP@@NCURSES_TINFO_5.0.19991023'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libtinfo.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:2108: recipe for target 'guestfish' failed
make[3]: *** [guestfish] Error 1

Additional info:
---------------
Ubuntu 16.10 4.8
Full build log is attached.

Comment 1 Richard W.M. Jones 2017-01-30 11:15:26 UTC
Can you see if this patch fixes it?

diff --git a/fish/Makefile.am b/fish/Makefile.am
index fa345d6..d806ebf 100644
--- a/fish/Makefile.am
+++ b/fish/Makefile.am
@@ -137,14 +137,15 @@ guestfish_CFLAGS = \
        $(LIBXML2_CFLAGS)
 
 guestfish_LDADD = \
-       $(LIBCONFIG_LIBS) \
-       $(LIBREADLINE) \
        $(top_builddir)/common/edit/libedit.la \
        $(top_builddir)/common/options/liboptions.la \
        $(top_builddir)/common/progress/libprogress.la \
        $(top_builddir)/common/utils/libutils.la \
        $(top_builddir)/lib/libguestfs.la \
        $(LIBXML2_LIBS) \
+       $(LIBCONFIG_LIBS) \
+       $(LIBREADLINE) \
+       $(LIBTINFO_LIBS) \
        $(LTLIBINTL) \
        -lm

Comment 2 jean-christophe manciot 2017-01-31 08:34:32 UTC
# git apply --stat ../bug.patch 
 fish/Makefile.am |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
# git apply --check ../bug.patch 
error: patch failed: fish/Makefile.am:137
error: fish/Makefile.am: patch does not apply

Comment 3 Richard W.M. Jones 2017-01-31 08:43:27 UTC
I don't understand what that means.  However I will attach
the patch directly to the BZ to avoid any copy and paste problems.

Comment 4 Richard W.M. Jones 2017-01-31 08:45:06 UTC
Created attachment 1246114 [details]
0001-fish-Link-to-libtinfo-RHBZ-1417549.patch

Comment 5 jean-christophe manciot 2017-02-11 06:55:11 UTC
Issue still there with v1.35.23.

Comment 6 Richard W.M. Jones 2017-02-11 07:36:06 UTC
Please try the patch.

Comment 7 jean-christophe manciot 2017-02-11 07:42:25 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1417549#c2

Comment 8 Richard W.M. Jones 2017-02-11 07:44:47 UTC
I'm closing this.  Please show some good will when we are
attempting to help you with fixes.

Comment 9 jean-christophe manciot 2017-02-11 15:38:39 UTC
Same issue in v1.35.24

Comment 10 Richard W.M. Jones 2017-02-11 16:04:14 UTC
I have just verified that the patch still applies to the
latest version.  Please try it and see if it fixes the problem
for you.  We do not see this bug on our local builds.

Comment 11 jean-christophe manciot 2017-02-13 09:00:42 UTC
Applying the "0001-fish-Link-to-libtinfo-RHBZ-1417549.patch" patch on v1.35.24 leads to the same issue.
You don't see it probably because you build with another OS.

Comment 12 jean-christophe manciot 2017-02-13 09:03:45 UTC
FYI, I've successfully built numerous libguestfs releases (up to v1.35.19) in the past in the exact same environment.

Comment 13 Pino Toscano 2017-02-13 16:25:25 UTC
(In reply to jean-christophe manciot from comment #11)
> Applying the "0001-fish-Link-to-libtinfo-RHBZ-1417549.patch" patch on
> v1.35.24 leads to the same issue.

What are the exact steps you are doing to test it?  I'm asking this because, when building from a release tarball, you need to autoreconf the sources (running `autoreconf -fi` from the top-level) so that the changes in autoconf (such as configure.ac, and the various *.m4 files) and automake files (such as the Makefile.am files) are correctly propagated to the static files of the autotools-based dist.

I hit the same issue when testing on openSUSE Factory, and Ubuntu devel, and the patch worked in both cases.  So I'd simply commit it, so it can be available also in release tarballs in libguestfs >= 1.35.25.

Comment 14 jean-christophe manciot 2017-02-14 04:47:13 UTC
You already have your answer https://bugzilla.redhat.com/show_bug.cgi?id=1417549#c0.

Comment 15 jean-christophe manciot 2017-02-14 06:57:48 UTC
Also, the script "git-reset-clean-pull-checkout.sh $branch $tag" does the following:
git_branch=$1
git_tag=$2

echo -------------------------
echo "Checking out $git_branch"
echo -------------------------
git checkout $git_branch
echo ---------------------
echo "Resetting & cleaning"
echo ---------------------
git reset --hard
git submodule foreach --recursive git reset --hard
git clean -fxd :/
echo -------------------------
echo "Checking out $git_branch"
echo -------------------------
git checkout $git_branch
echo --------------------
echo "Pulling with rebase"
echo --------------------
git pull -v --progress --rebase
return_code=$?
if [ $return_code -ne 0 ]; then
        exit $return_code
fi
git submodule update --init --recursive
git fetch --tags
git checkout $git_tag

exit 0

Comment 16 Pino Toscano 2017-02-14 12:30:48 UTC
I just pushed the patch, as it was fixing the issue for me:
https://github.com/libguestfs/libguestfs/commit/1230543f7159c8a936b52eda792340c9759a420b
It will be in libguestfs >= 1.35.25.

Do you have hardening-wrapper installed, by chance?

Comment 17 jean-christophe manciot 2017-02-15 08:20:53 UTC
I'll wait then and yes.

Comment 18 Pino Toscano 2017-02-15 09:58:10 UTC
Just tried, and git/master (which includes the patch) builds fine also with hardening-wrapper installed -- thus, marking it as fixed.

Comment 19 jean-christophe manciot 2017-02-16 13:48:29 UTC
Yes, this issue is solved, even though there are other issues during the test process "make check".


Note You need to log in before you can comment on or make changes to this bug.