Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2014 18:49:46 -0800 (PST)
From:      Don Lewis <truckman@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/187014: print/xdvik fails with iconv linker errors
Message-ID:  <201402250249.s1P2nk1e068420@mousie.catspoiler.org>
Resent-Message-ID: <201402250250.s1P2o11c042302@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187014
>Category:       ports
>Synopsis:       print/xdvik fails with iconv linker errors
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 25 02:50:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Don Lewis
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
FreeBSD project
>Environment:
System: FreeBSD scratch.catspoiler.org 11.0-CURRENT FreeBSD 11.0-CURRENT #70 r262340M: Sat Feb 22 15:58:39 PST 2014     dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB  i386


Ports revision r345674

>Description:

The build phase for print/xdvik fails at this point:

cc -o xdvi-motif browser.o dl_list.o dvi-draw.o dvi-init.o dvisel.o encodings.o events.o exit-handlers.o filehist.o font-open.o gf.o string_list.o hypertex.o image-magick.o main.o mime.o my-snprintf.o my-vsnprintf.o pagehist.o pk.o print-internal.o psdps.o psgs.o psheader.o psnews.o read-mapfile.o search-internal.o special.o string-utils.o tfmload.o util.o vf.o xdvi.o xserver-info.o x_util.o -Wl,--allow-multiple-definition  ./gui/libgui.a -L/usr/local/lib /usr/local/lib/libt1.so ../kpathsea/.libs/libkpathsea.a /usr/local/lib/libXm.so /usr/local/lib/libXft.so /usr/local/lib/libfontconfig.so /usr/local/lib/libexpat.so /usr/local/lib/libfreetype.so -lz -lbz2 -lpng15 /usr/local/lib/libXrender.so /usr/local/lib/libjpeg.so -lpng /usr/local/lib/libXmu.so /usr/local/lib/libXt.so /usr/local/lib/libSM.so /usr/local/lib/libICE.so /usr/local/lib/libXp.so /usr/local/lib/libXext.so /usr/local/lib/libXpm.so /usr/local/lib/libX11.so /usr/local/lib/libxcb.so /usr/local/lib/libXau.so /usr/loc!
 al/lib/libXdmcp.so /usr/local/lib/libpthread-stubs.so -lrpcsvc -lm -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
encodings.o: In function `cjk2unicode':
encodings.c:(.text+0x12f): undefined reference to `libiconv_open'
encodings.c:(.text+0x17a): undefined reference to `libiconv'
encodings.o: In function `close_iconv':
encodings.c:(.text+0x33d2): undefined reference to `libiconv_close'
util.o: In function `iconv_convert_string':
util.c:(.text+0x2950): undefined reference to `libiconv_open'
util.c:(.text+0x29e5): undefined reference to `libiconv'
util.c:(.text+0x29f9): undefined reference to `libiconv_close'
util.c:(.text+0x2b23): undefined reference to `libiconv_close'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [xdvi-motif] Error 1
gmake[3]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16/texk/xdvik'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16/texk'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/ports/print/xdvik/work/xdvik-22.84.16'
*** Error code 1

Stop.
make: stopped in /usr/ports/print/xdvik


The problem seems to be that the build picks up /usr/local/include/iconv.h
instead of /usr/include/iconv.h.  The former include file has #define
statements that rename iconv_open to libiconv_open, etc.  This would
probably work if the port also listed libiconv as a dependency and linked
against /usr/local/lib/libiconv*, but neither of these is true.
The configure script doesn't add -L/usr/local/lib to the command line
when it is checked to see if it should link with -liconv.

This probably used to work before iconv was added to the libc because
configure would not have found iconv support.

>How-To-Repeat:

Attempt to build the port on a version of FreeBSD that includes iconv
in libc.

>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402250249.s1P2nk1e068420>