Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40128 closed defect (fixed)

rpm: Undefined symbols: _libiconv _libiconv_close _libiconv_open

Reported by: KurtPfeifle (Kurt Pfeifle) Owned by: afb@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: haspatch Cc: n3npq@…, ryandesign (Ryan Carsten Schmidt), eric.bryant@…, jyewen001@…, cooljeanius (Eric Gallager)
Port: rpm

Description

My attempt to run 'port -p upgrade grok' failed. The following lines are in the log:

Extracting /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_sysutils_rpm/rpm/work/rpm-4.4.9/rpmio/../zlib/.libs/libz.a
(cd .libs/librpmio.lax/libz.a && ar x /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_sysutils_rpm/rpm/work/rpm-4.4.9/rpmio/../zlib/.libs/libz.a)
/usr/bin/clang -dynamiclib  -o .libs/librpmio-4.4.dylib  .libs/argv.o .libs/digest.o .libs/fts.o .libs/macro.o .libs/mire.o .libs/md2.o .libs/md4.o .libs/rmd128.o .libs/rmd160.o .libs/rmd256.o .libs/rmd320.o .libs/sha224.o .libs/salsa10.o .libs/salsa20.o .libs/tiger.o .libs/rpmdav.o .libs/rpmhash.o .libs/rpmhook.o .libs/rpmio.o .libs/rpmlog.o .libs/rpmlua.o .libs/rpmmalloc.o .libs/rpmpgp.o .libs/rpmrpc.o .libs/rpmsq.o .libs/rpmsw.o .libs/strcasecmp.o .libs/strtolocale.o .libs/stubs.o .libs/url.o .libs/ugid.o .libs/LzmaDecode.o  .libs/librpmio.lax/liblua.a/liblua_la-lapi.o .libs/librpmio.lax/liblua.a/liblua_la-lauxlib.o .libs/librpmio.lax/liblua.a/liblua_la-lbaselib.o .libs/librpmio.lax/liblua.a/liblua_la-lcode.o .libs/librpmio.lax/liblua.a/liblua_la-ldblib.o .libs/librpmio.lax/liblua.a/liblua_la-ldebug.o .libs/librpmio.lax/liblua.a/liblua_la-ldo.o .libs/librpmio.lax/liblua.a/liblua_la-ldump.o .libs/librpmio.lax/liblua.a/liblua_la-lfunc.o .libs/librpmio.lax/liblua.a/liblua_la-lgc.o .libs/librpmio.lax/liblua.a/liblua_la-linit.o .libs/librpmio.lax/liblua.a/liblua_la-liolib.o .libs/librpmio.lax/liblua.a/liblua_la-llex.o .libs/librpmio.lax/liblua.a/liblua_la-lmathlib.o .libs/librpmio.lax/liblua.a/liblua_la-lmem.o .libs/librpmio.lax/liblua.a/liblua_la-loadlib.o .libs/librpmio.lax/liblua.a/liblua_la-lobject.o .libs/librpmio.lax/liblua.a/liblua_la-lopcodes.o .libs/librpmio.lax/liblua.a/liblua_la-lparser.o .libs/librpmio.lax/liblua.a/liblua_la-lposix.o .libs/librpmio.lax/liblua.a/liblua_la-lrexlib.o .libs/librpmio.lax/liblua.a/liblua_la-lstate.o .libs/librpmio.lax/liblua.a/liblua_la-lstring.o .libs/librpmio.lax/liblua.a/liblua_la-lstrlib.o .libs/librpmio.lax/liblua.a/liblua_la-lsyck.o .libs/librpmio.lax/liblua.a/liblua_la-ltable.o .libs/librpmio.lax/liblua.a/liblua_la-ltablib.o .libs/librpmio.lax/liblua.a/liblua_la-ltests.o .libs/librpmio.lax/liblua.a/liblua_la-ltm.o .libs/librpmio.lax/liblua.a/liblua_la-lundump.o .libs/librpmio.lax/liblua.a/liblua_la-lvm.o .libs/librpmio.lax/liblua.a/liblua_la-lzio.o  .libs/librpmio.lax/libsyck.a/bytecode.o .libs/librpmio.lax/libsyck.a/emitter.o .libs/librpmio.lax/libsyck.a/gram.o .libs/librpmio.lax/libsyck.a/handler.o .libs/librpmio.lax/libsyck.a/implicit.o .libs/librpmio.lax/libsyck.a/node.o .libs/librpmio.lax/libsyck.a/syck.o .libs/librpmio.lax/libsyck.a/syck_st.o .libs/librpmio.lax/libsyck.a/token.o .libs/librpmio.lax/libsyck.a/yaml2byte.o  .libs/librpmio.lax/libmagic.a/apprentice.o .libs/librpmio.lax/libmagic.a/apptype.o .libs/librpmio.lax/libmagic.a/ascmagic.o .libs/librpmio.lax/libmagic.a/compress.o .libs/librpmio.lax/libmagic.a/fsmagic.o .libs/librpmio.lax/libmagic.a/funcs.o .libs/librpmio.lax/libmagic.a/is_tar.o .libs/librpmio.lax/libmagic.a/magic.o .libs/librpmio.lax/libmagic.a/print.o .libs/librpmio.lax/libmagic.a/readelf.o .libs/librpmio.lax/libmagic.a/softmagic.o  .libs/librpmio.lax/libz.a/adler32.o .libs/librpmio.lax/libz.a/compress.o .libs/librpmio.lax/libz.a/crc32.o .libs/librpmio.lax/libz.a/deflate.o .libs/librpmio.lax/libz.a/gzio.o .libs/librpmio.lax/libz.a/infback.o .libs/librpmio.lax/libz.a/inffast.o .libs/librpmio.lax/libz.a/inflate.o .libs/librpmio.lax/libz.a/inftrees.o .libs/librpmio.lax/libz.a/trees.o .libs/librpmio.lax/libz.a/uncompr.o .libs/librpmio.lax/libz.a/zutil.o   -L/opt/local/lib /opt/local/lib/libbeecrypt.dylib /opt/local/lib/libneon.dylib -lm -ldl -L/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_ports_sysutils_rpm/rpm/work/rpm-4.4.9/zlib -lz -lpthread -lbz2  -arch x86_64 -install_name  /opt/local/lib/librpmio-4.4.dylib 
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _xstrtolocale in strtolocale.o
  "_libiconv_close", referenced from:
      _xstrtolocale in strtolocale.o
  "_libiconv_open", referenced from:
      _xstrtolocale in strtolocale.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gnumake[2]: *** [librpmio.la] Error 1

Attachments (3)

main.log (641.1 KB) - added by KurtPfeifle (Kurt Pfeifle) 11 years ago.
New 'main.log' for rpm after cleaning and building again.
rpm.diff (793 bytes) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
proposed patch
main.2.log (670.1 KB) - added by eric.bryant@… 11 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 11 years ago by KurtPfeifle (Kurt Pfeifle)

Wrong line in description. I did try to upgrade 'rpm', not 'grok'.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: 'rpm' does not buildrpm: Undefined symbols: _libiconv _libiconv_close _libiconv_open

This wasn't a clean build; please clean and try again and attach the new main.log file.

Changed 11 years ago by KurtPfeifle (Kurt Pfeifle)

Attachment: main.log added

New 'main.log' for rpm after cleaning and building again.

comment:3 in reply to:  2 Changed 11 years ago by KurtPfeifle (Kurt Pfeifle)

Replying to ryandesign@…:

This wasn't a clean build; please clean and try again and attach the new main.log file.

Done.

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; afb@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to afb@…

Looks like rpm should declare a dependency on libiconv and add the -liconv flag when building. See patch.

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: rpm.diff added

proposed patch

comment:5 Changed 11 years ago by eric.bryant@…

The suggested patch did not work for me, having used 'sudo port edit rpm', I saw the same error.

Last edited 11 years ago by eric.bryant@… (previous) (diff)

Changed 11 years ago by eric.bryant@…

Attachment: main.2.log added

comment:6 Changed 11 years ago by eric.bryant@…

Cc: eric.bryant@… added

Cc Me!

comment:7 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jyewen001@… added

Has duplicate #41696.

comment:8 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

I tested the patch before attaching it. It works. Committed in r114332 (maintainer timeout).

On Mavericks there is a different problem for which I filed #41697.

comment:9 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:10 in reply to:  8 Changed 11 years ago by jyewen001@…

It's worked now,because i was upgrading the Xcode 4.2 to 5.0.2,so thanks for you,i forget reply to you before,i'm sorry.

Replying to ryandesign@…:

I tested the patch before attaching it. It works. Committed in r114332 (maintainer timeout).

On Mavericks there is a different problem for which I filed #41697.

Note: See TracTickets for help on using tickets.