pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43809: mtools build fails because of missing linker flag

>Number:         43809
>Category:       pkg
>Synopsis:       mtools build fails because of missing linker flag
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 28 17:20:00 +0000 2010
>Originator:     Emmanuel Kasper
uname -srm
Darwin 9.8.0 Power Macintosh

Building mtools on my system fails with the following error:

gcc -L/Volumes/Projects/netbsd/lib   buffer.o charsetConv.o codepages.o 
config.o copyfile.o devices.o dirCache.o directory.o direntry.o expand.o fat.o 
fat_free.o file.o file_name.o filter.o floppyd_io.o force_io.o hash.o init.o 
llong.o match.o mainloop.o mattrib.o mbadblocks.o mcat.o mcd.o mclasserase.o 
mcopy.o mdel.o mdir.o mdoctorfat.o mdu.o mformat.o minfo.o misc.o missFuncs.o 
mk_direntry.o mlabel.o mmd.o mmount.o mmove.o mpartition.o mshowfat.o mzip.o 
mtools.o patchlevel.o plain_io.o precmd.o privileges.o scsi.o signal.o stream.o 
streamcache.o subdir.o unixdir.o tty.o vfat.o xdf_io.o -o mtools
Undefined symbols:
  "_iconv", referenced from:
      _wchar_to_dos in charsetConv.o
      _dos_to_wchar in charsetConv.o
      _cp_open in charsetConv.o
  "_iconv_open", referenced from:
and more ...

it looks like cpp uses the system headers for libiconv, but then the linker 
uses pkgsrc libiconv at the linking stage

at quick look at the exported symbols show that _iconv_open is defined on the 
system libiconv but not on pkgsrc 

manu@leo:~$ nm /Volumes/Projects/netbsd/lib/libiconv.dylib  | grep _iconv_open
manu@leo:~$ nm /usr/lib/libiconv.dylib  | grep _iconv_open
0001854c T _iconv_open

bmake build


LDFLAGS.Darwin+=    -liconv

to the Makefile fixes the problem.

Home | Main Index | Thread Index | Old Index