Opened 15 years ago

Closed 15 years ago

#24789 closed defect (invalid)

Same problem building almost any package

Reported by: knithx@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: blair (Blair Zajac), landonf (Landon Fuller), ryandesign (Ryan Carsten Schmidt)
Port: zlib m4

Description (last modified by jmroot (Joshua Root))

 sudo port install bison
--->  Computing dependencies for m4
--->  Building m4
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_m4/work/m4-1.4.14" && /usr/bin/make -j2 all " returned error 2
Command output:       _add_include_directory in path.o
      _include_env_init in path.o
      _lookup_symbol in symtab.o
      _lookup_symbol in symtab.o
      _lookup_symbol in symtab.o
  "_xprintf", referenced from:
      _usage in m4.o
      _usage in m4.o
      _usage in m4.o
  "_mkstemp_safer", referenced from:
      _mkstemp_helper in builtin.o
  "_unregister_temp_file", referenced from:
      _make_room_for in output.o
      _insert_diversion_helper in output.o
  "_rpl_optarg", referenced from:
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
      _main in m4.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [m4] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade m4 failed
Before reporting a bug, first run the command again with the -d flag to get complete output.

sudo port install ffmpeg
Password:
--->  Computing dependencies for zlib
--->  Building zlib
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/make -j2 all " returned error 2
Command output:       _test_large_deflate in example.o
      _test_large_deflate in example.o
      _test_large_deflate in example.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [example] Error 1
make: *** Waiting for unfinished jobs....
ld: warning: in libz.a, file is not of required architecture
Undefined symbols:
  "_gzopen", referenced from:
      _file_uncompress in minigzip.o
      _file_compress in minigzip.o
      _main in minigzip.o
  "_gzerror", referenced from:
      _gz_uncompress in minigzip.o
      _gz_compress in minigzip.o
  "_gzwrite", referenced from:
      _gz_compress in minigzip.o
  "_gzread", referenced from:
      _gz_uncompress in minigzip.o
  "_gzdopen", referenced from:
      _main in minigzip.o
      _main in minigzip.o
      _main in minigzip.o
  "_gzclose", referenced from:
      _gz_uncompress in minigzip.o
      _gz_compress in minigzip.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [minigzip] Error 1

Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade zlib failed
Before reporting a bug, first run the command again with the -d flag to get complete output.

--->  Building zlib
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/make -j2 all " returned error 2
Command output:       _test_large_deflate in example.o
      _test_large_deflate in example.o
      _test_large_deflate in example.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [example] Error 1
make: *** Waiting for unfinished jobs....
ld: warning: in libz.a, file is not of required architecture
Undefined symbols:
  "_gzopen", referenced from:
      _file_uncompress in minigzip.o
      _file_compress in minigzip.o
      _main in minigzip.o
  "_gzerror", referenced from:
      _gz_uncompress in minigzip.o
      _gz_compress in minigzip.o
  "_gzwrite", referenced from:
      _gz_compress in minigzip.o
  "_gzread", referenced from:
      _gz_uncompress in minigzip.o
  "_gzdopen", referenced from:
      _main in minigzip.o
      _main in minigzip.o
      _main in minigzip.o
  "_gzclose", referenced from:
      _gz_uncompress in minigzip.o
      _gz_compress in minigzip.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [minigzip] Error 1

Error: Unable to upgrade port: 1
Error: Unable to execute port: upgrade tiff failed
Before reporting a bug, first run the command again with the -d flag to get complete output.

And so on with others.

What am I doing wrong? It is my fault or Macports'?

Thanks.

Change History (7)

comment:1 Changed 15 years ago by jmroot (Joshua Root)

Cc: blair@… landonf@… ryandesign@… added
Description: modified (diff)
Keywords: failure build undefined symbols crash removed
Port: m4 added
Priority: HighNormal

Please remember to preview and use WikiFormatting, and cc the maintainers. As per the ticket guidelines, the High priority is reserved for the use of MacPorts team members.

You need to provide debug output, as the message at the end of each of your quotes says.

comment:2 in reply to:  1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jmr@…:

You need to provide debug output, as the message at the end of each of your quotes says.

That means, for example with zlib, which is a good place to start:

sudo port clean zlib
sudo port -d install zlib

comment:3 Changed 15 years ago by knithx@…

Cleaning:

knithx @ ~ sudo port clean zlib
Password:
--->  Cleaning zlib

Installing:

knithx @ ~ sudo port -d install zlib
DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib
DEBUG: OS Platform: darwin
DEBUG: OS Version: 10.3.0
DEBUG: Mac OS X Version: 10.6
DEBUG: System Arch: i386
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: adding the default universal variant
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: Requested variant darwin is not provided by port zlib.
DEBUG: Requested variant i386 is not provided by port zlib.
DEBUG: Requested variant macosx is not provided by port zlib.
DEBUG: Attempting ln -sf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib/work
--->  Computing dependencies for zlib
DEBUG: Executing org.macports.main (zlib)
--->  Fetching zlib
DEBUG: Executing org.macports.fetch (zlib)
--->  Verifying checksum(s) for zlib
DEBUG: Executing org.macports.checksum (zlib)
--->  Checksumming zlib-1.2.5.tar.bz2
DEBUG: Correct (md5) checksum for zlib-1.2.5.tar.bz2
DEBUG: Correct (sha1) checksum for zlib-1.2.5.tar.bz2
DEBUG: Correct (rmd160) checksum for zlib-1.2.5.tar.bz2
DEBUG: setting option extract.cmd to /usr/bin/bzip2
--->  Extracting zlib
DEBUG: Executing org.macports.extract (zlib)
--->  Extracting zlib-1.2.5.tar.bz2
DEBUG: setting option extract.args to /opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work" && /usr/bin/bzip2 -dc /opt/local/var/macports/distfiles/zlib/zlib-1.2.5.tar.bz2 | /usr/bin/gnutar --no-same-owner -xf -'
DEBUG: Executing org.macports.patch (zlib)
--->  Applying patches to zlib
--->  Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/zlib/files/patch-Makefile.in.diff
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/patch -p0'
patching file Makefile.in
--->  Configuring zlib
DEBUG: Using compiler 'Mac OS X gcc 4.2'
DEBUG: Executing org.macports.configure (zlib)
DEBUG: Environment: CFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m64' LDFLAGS='-L/opt/local/lib -arch x86_64' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' CC='/usr/bin/gcc-4.2'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && ./configure --prefix=/opt/local'
Checking for shared library support...
Building shared library libz.1.2.5.dylib with /usr/bin/gcc-4.2.
Checking for off64_t... No.
Checking for fseeko... Yes.
Checking for unistd.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
--->  Building zlib
DEBUG: Executing org.macports.build (zlib)
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/make -j2 all'
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o example.o example.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o adler32.o adler32.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o compress.o compress.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o crc32.o crc32.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o deflate.o deflate.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o gzclose.o gzclose.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o gzlib.o gzlib.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o gzread.o gzread.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o gzwrite.o gzwrite.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o infback.o infback.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o inffast.o inffast.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o inflate.o inflate.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o inftrees.o inftrees.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o trees.o trees.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o uncompr.o uncompr.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o zutil.o zutil.c
/usr/bin/gcc-4.2 -O2 -arch x86_64   -c -o minigzip.o minigzip.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/adler32.o adler32.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/compress.o compress.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/crc32.o crc32.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/deflate.o deflate.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/gzclose.o gzclose.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/gzlib.o gzlib.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/gzread.o gzread.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/gzwrite.o gzwrite.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/infback.o infback.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/inffast.o inffast.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/inflate.o inflate.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/inftrees.o inftrees.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/trees.o trees.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/uncompr.o uncompr.c
/usr/bin/gcc-4.2 -O2 -arch x86_64 -fPIC -DPIC -c -o objs/zutil.o zutil.c
ar rc libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 
/usr/bin/gcc-4.2 -O2 -arch x86_64 -o example example.o -L. libz.a
ld: warning: in libz.a, file is not of required architecture
Undefined symbols:
  "_gzputc", referenced from:
      _test_gzio in example.o
  "_gzungetc", referenced from:
      _test_gzio in example.o
  "_inflateSync", referenced from:
      _test_sync in example.o
  "_inflateEnd", referenced from:
      _test_dict_inflate in example.o
      _test_sync in example.o
      _test_large_inflate in example.o
      _test_inflate in example.o
  "_gzputs", referenced from:
      _test_gzio in example.o
  "_gzgetc", referenced from:
      _test_gzio in example.o
  "_deflateParams", referenced from:
      _test_large_deflate in example.o
      _test_large_deflate in example.o
  "_gzgets", referenced from:
      _test_gzio in example.o
  "_deflateInit_", referenced from:
      _test_dict_deflate in example.o
      _test_flush in example.o
      _test_deflate in example.o
      _test_large_deflate in example.o
  "_zlibCompileFlags", referenced from:
      _main in example.o
  "_inflate", referenced from:
      _test_dict_inflate in example.o
      _test_sync in example.o
      _test_sync in example.o
      _test_large_inflate in example.o
      _test_inflate in example.o
  "_deflateEnd", referenced from:
      _test_dict_deflate in example.o
      _test_flush in example.o
      _test_deflate in example.o
      _test_large_deflate in example.o
  "_gztell", referenced from:
      _test_gzio in example.o
      _test_gzio in example.o
  "_zlibVersion", referenced from:
      _main in example.o
      _main in example.o
  "_gzopen", referenced from:
      _test_gzio in example.o
      _test_gzio in example.o
  "_inflateInit_", referenced from:
      _test_dict_inflate in example.o
      _test_sync in example.o
      _test_large_inflate in example.o
      _test_inflate in example.o
  "_compress", referenced from:
      _test_compress in example.o
  "_gzerror", referenced from:
      _test_gzio in example.o
      _test_gzio in example.o
      _test_gzio in example.o
      _test_gzio in example.o
  "_gzprintf", referenced from:
      _test_gzio in example.o
  "_inflateSetDictionary", referenced from:
      _test_dict_inflate in example.o
  "_uncompress", referenced from:
      _test_compress in example.o
  "_gzseek", referenced from:
      _test_gzio in example.o
      _test_gzio in example.o
  "_deflateSetDictionary", referenced from:
      _test_dict_deflate in example.o
  "_gzread", referenced from:
      _test_gzio in example.o
  "_gzclose", referenced from:
      _test_gzio in example.o
      _test_gzio in example.o
  "_deflate", referenced from:
      _test_dict_deflate in example.o
      _test_flush in example.o
      _test_flush in example.o
      _test_deflate in example.o
      _test_deflate in example.o
      _test_large_deflate in example.o
      _test_large_deflate in example.o
      _test_large_deflate in example.o
      _test_large_deflate in example.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [example] Error 1
make: *** Waiting for unfinished jobs....
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/make -j2 all " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_zlib/work/zlib-1.2.5" && /usr/bin/make -j2 all " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for zlib): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

comment:4 Changed 15 years ago by danielluke (Daniel J. Luke)

Do you perhaps have a broken libz in /usr/local?

comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Any response, reporter?

comment:6 Changed 15 years ago by knithx@…

It seems that a clean install of macports solved the problem. Thanks to all.

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

Resolution: invalid
Status: newclosed

Ok, glad you got it working.

Note: See TracTickets for help on using tickets.