Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#13297 closed defect (fixed)

net-snmp-5.4 fails to build on Mac OS X 10.5 Leopard

Reported by: arion@… Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 1.5.0
Keywords: leopard intel Cc: opendarwin.org@…, nox@…, icereaperx303@…
Port: net-snmp

Description (last modified by nox@…)

ginza:~ arion$ sudo port install net-snmp
--->  Fetching net-snmp
--->  Verifying checksum(s) for net-snmp
--->  Extracting net-snmp
--->  Applying patches to net-snmp
--->  Configuring net-snmp
--->  Building net-snmp with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_net-snmp/work/net-snmp-5.4" && make all " returned error 2
Command output: gcc -E -Iinclude -I./include -I./agent/mibgroup -I. -I. -DDONT_INC_STRUCTS -DBINDIR=/opt/local/bin -x c -no-cpp-precomp ./sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript
echo 's#DATADIR#/opt/local/share#g' >> sedscript
echo 's#LIBDIR#/opt/local/lib#g' >> sedscript
echo 's#BINDIR#/opt/local/bin#g' >> sedscript
echo 's#PERSISTENT_DIRECTORY#/opt/local/var/net-snmp#g' >> sedscript
echo 's#SYSCONFDIR#/opt/local/etc#g' >> sedscript
/usr/bin/sed -f sedscript ./EXAMPLE.conf.def > EXAMPLE.conf
making all in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_net-snmp/work/net-snmp-5.4/snmplib
/bin/sh ../libtool  --mode=compile gcc -I../include -I.         -I../snmplib -I/opt/local/include -I/opt/local/include  -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include  -I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE  -O2 -Udarwin9 -Ddarwin9=darwin9  -c -o snmp_client.lo snmp_client.c
mkdir .libs
 gcc -I../include -I. -I../snmplib -I/opt/local/include -I/opt/local/include -arch i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/local/include -I/System/Library/Perl/5.8.8/darwin-thread-multi-2level/CORE -O2 -Udarwin9 -Ddarwin9=darwin9 -c snmp_client.c  -fno-common -DPIC -o .libs/snmp_client.o
In file included from snmp_client.c:96:
../include/net-snmp/types.h:68: error: conflicting types for 'ssize_t'
/usr/include/string.h:70: error: previous declaration of 'ssize_t' was here
In file included from snmp_client.c:96:
../include/net-snmp/types.h:68: error: conflicting types for 'ssize_t'
/usr/include/string.h:70: error: previous declaration of 'ssize_t' was here
lipo: can't open input file: /var/tmp//cc0g3x3H.out (No such file or directory)
make[1]: *** [snmp_client.lo] Error 1
make: *** [subdirs] Error 1

Error: Status 1 encountered during processing.
ginza:~ arion$

I was able to get past the "ssize_t" with a little hackery but then ran into problems related to missing architectures during linking (even though I did not specify +universal variant).

Change History (10)

comment:1 Changed 16 years ago by nox@…

Cc: nox@… added
Summary: BUG: net-snmp -5.4 build failure on Leopard (10.5) intelnet-snmp-5.4 fails to build on Mac OS X 10.5 Leopard

By the way, it should not try to build universally if the universal variant is not requested.

comment:2 Changed 16 years ago by dsm717@…

net-snmp still fails to install on Mac OS X 10.5.2 (Intel) with the ppc linking problem:

$ sudo port install net-snmp
--->  Fetching net-snmp
--->  Attempting to fetch net-snmp-5.4.tar.gz from http://downloads.sourceforge.net/net-snmp
--->  Verifying checksum(s) for net-snmp
--->  Extracting net-snmp
--->  Applying patches to net-snmp
--->  Configuring net-snmp
--->  Building net-snmp with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_net_net-snmp/work/net-snmp-5.4" && make all " returned error 2
Command output:       _main in snmptrapd.o
  "_print_format1", referenced from:
      _print_format1$non_lazy_ptr in snmptrapd.o
  "_print_format2", referenced from:
      _print_format2$non_lazy_ptr in snmptrapd.o
  "_netsnmp_ds_set_string", referenced from:
      _main in snmptrapd.o
      _main in snmptrapd.o
      _main in snmptrapd.o
  "_read_config_print_usage", referenced from:
      _main in snmptrapd.o
  "_netsnmp_ds_get_int", referenced from:
      _main in snmptrapd.o
      _main in snmptrapd.o
  "_netsnmp_ds_set_int", referenced from:
      _parse_config_agentuser in snmptrapd.o
      _parse_config_agentuser in snmptrapd.o
      _parse_config_agentgroup in snmptrapd.o
      _parse_config_agentgroup in snmptrapd.o
      _main in snmptrapd.o
      _main in snmptrapd.o
  "_snmp_sess_init", referenced from:
      _main in snmptrapd.o
  "_snmp_log_options_usage", referenced from:
      _usage in snmptrapd.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccoXInRA.out (No such file or directory)
make[1]: *** [snmptrapd] Error 1
make: *** [subdirs] Error 1

Error: Status 1 encountered during processing.

comment:3 Changed 16 years ago by dsm717@…

I should probably note that the error I reported in my previous comment is with MacPorts 1.6.0.

comment:4 Changed 16 years ago by jmroot (Joshua Root)

Cc: icereaperx303@… added; openmaintainer@… removed

Cc reporter of duplicate #14575.

comment:5 Changed 16 years ago by ghosthound

Owner: changed from macports-tickets@… to ricci@…
Status: newassigned

comment:6 Changed 15 years ago by nox@…

Description: modified (diff)

Does it still occur with net-snmp-5.4.1?

comment:7 Changed 15 years ago by nox@…

Keywords: net-snmp removed
Port: net-snmp added

comment:8 Changed 15 years ago by arion@…

Verified that this has been fixed with v5.4.1, compiles fine now. Thanks!

comment:9 Changed 15 years ago by nox@…

Resolution: fixed
Status: assignedclosed

comment:10 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.