#2526 5.7.2.1 was not cleaned before packaging, leading to bloated tarball and build failure

64-bit
open
nobody
None
5
2014-09-04
2014-02-27
Ryan Schmidt
No

Hello, I'm the maintainer of net-snmp in MacPorts. In the process of trying to update it to version 5.7.2.1, I discovered that 5.7.2.1 has been packaged improperly. The tarball is 27MB. The tarball for 5.7.2 was only 6MB. Turns out 5.7.2.1 was not cleaned before packaging, so it contains ELF object files, leading to build failure on non-ELF systems, like OS X:

libtool: compile:  ccache /usr/bin/clang -I../../include -I/opt/local/include -isystem/opt/local/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -Udarwin13 -Ddarwin13=darwin13 -pipe -Os -fno-common -DPERL_DARWIN -isystem/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include -I/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/CORE -c winstub.c -o winstub.o >/dev/null 2>&1
/bin/sh ../../libtool  --mode=link ccache /usr/bin/clang -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -Udarwin13 -Ddarwin13=darwin13  -pipe -Os   -fno-common -DPERL_DARWIN -isystem/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include  -I/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/CORE   -o snmpnetstat inet.lo inet6.lo if.lo main.lo route.lo winstub.lo ffs.lo  -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64  ../../snmplib/libnetsnmp.la  
libtool: link: ccache /usr/bin/clang -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64 -Udarwin13 -Ddarwin13=darwin13 -pipe -Os -fno-common -DPERL_DARWIN -isystem/opt/local/include -no-cpp-precomp -fno-strict-aliasing -fstack-protector -I/opt/local/include -I/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/CORE -o .libs/snmpnetstat .libs/inet.o .libs/inet6.o .libs/if.o .libs/main.o .libs/route.o .libs/winstub.o .libs/ffs.o -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -arch x86_64  -L/opt/local/lib ../../snmplib/.libs/libnetsnmp.dylib -lcrypto 
ld: warning: ignoring file .libs/ffs.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): .libs/ffs.o
Undefined symbols for architecture x86_64:
  "__ffs", referenced from:
      _netname in route.o
ld: symbol(s) not found for architecture x86_64

Running "make clean" ends with the following error:

making clean in /opt/local/var/macports/build/_Users_rschmidt_macports_dports_net_net-snmp/net-snmp/work/net-snmp-5.7.2.1/mibs
/bin/sh ../libtool  --mode=clean rm -f     core      
make[1]: *** No rule to make target `/usr/lib64/perl5/Config.pm', needed by `Makefile'.  Stop.
make: *** [perlclean] Error 2

Running "make" now also ends with that error. OS X does not use "lib64" directories.

You may want to release a properly-packaged 5.7.2.2.

Discussion

  • Ryan Steinmetz
    Ryan Steinmetz
    2014-03-04

    This also impacts the build under FreeBSD.

     
  • Ryan Schmidt
    Ryan Schmidt
    2014-05-19

    Looks like 5.7.2.1 was re-released on 2014-03-10, fixing this problem. Assuming you've identified how this problem happened in the first place and have taken measures to ensure it doesn't happen in the future, this ticket can be closed.