Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60872 closed defect (fixed)

clamav @0.102.4 does not build on older systems because of undefined symbols: "_unlinkat", "_renameat", "_openat"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: clamav

Description

/opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I.. -I../libclammspack  -I.. -I../shared -I../libclamav -I/opt/local/include -I/opt/local/include/json-c -I/opt/local/include  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -pipe -O0 -arch ppc -fno-strict-aliasing  -MT actions.o -MD -MP -MF .deps/actions.Tpo -c -o actions.o `test -f '../shared/actions.c' || echo './'`../shared/actions.c
../shared/actions.c: In function 'traverse_to':
../shared/actions.c:328:23: warning: implicit declaration of function 'openat'; did you mean 'open'? [-Wimplicit-function-declaration]
         next_handle = openat(current_handle, tokens[i], O_RDONLY | O_NOFOLLOW);
                       ^~~~~~
                       open
../shared/actions.c: In function 'traverse_rename':
../shared/actions.c:455:14: warning: implicit declaration of function 'renameat'; did you mean 'rename'? [-Wimplicit-function-declaration]
     if (0 != renameat(source_directory_fd, source_basename, -1, destination)) {
              ^~~~~~~~
              rename
../shared/actions.c: In function 'traverse_unlink':
../shared/actions.c:568:14: warning: implicit declaration of function 'unlinkat'; did you mean 'unlink'? [-Wimplicit-function-declaration]
     if (0 != unlinkat(target_directory_fd, target_basename, 0)) {
              ^~~~~~~~
              unlink
mv -f .deps/actions.Tpo .deps/actions.Po
/opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I.. -I../libclammspack  -I.. -I../shared -I../libclamav -I/opt/local/include -I/opt/local/include/json-c -I/opt/local/include  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -pipe -O0 -arch ppc -fno-strict-aliasing  -MT misc.o -MD -MP -MF .deps/misc.Tpo -c -o misc.o `test -f '../shared/misc.c' || echo './'`../shared/misc.c
mv -f .deps/misc.Tpo .deps/misc.Po
/opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I.. -I../libclammspack  -I.. -I../shared -I../libclamav -I/opt/local/include -I/opt/local/include/json-c -I/opt/local/include  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -pipe -O0 -arch ppc -fno-strict-aliasing  -MT clamscan.o -MD -MP -MF .deps/clamscan.Tpo -c -o clamscan.o clamscan.c
mv -f .deps/clamscan.Tpo .deps/clamscan.Po
/opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -DCL_NOTHREADS -I. -I.. -I../libclammspack  -I.. -I../shared -I../libclamav -I/opt/local/include -I/opt/local/include/json-c -I/opt/local/include  -I/opt/local/include -I/opt/local/include -I/opt/local/include  -pipe -O0 -arch ppc -fno-strict-aliasing  -MT manager.o -MD -MP -MF .deps/manager.Tpo -c -o manager.o manager.c
mv -f .deps/manager.Tpo .deps/manager.Po
/bin/sh ../libtool  --tag=CC   --mode=link /opt/local/bin/gcc-mp-7  -pipe -O0 -arch ppc -fno-strict-aliasing   -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -L/opt/local/lib -o clamscan output.o getopt.o optparser.o actions.o misc.o clamscan.o manager.o  ../libclamav/libclamav.la  
libtool: link: rm -f .libs/clamscan.nm .libs/clamscan.nmS .libs/clamscan.nmT
libtool: link: rm -f ".libs/clamscan.nmI"
libtool: link: (cd .libs && /opt/local/bin/gcc-mp-7 -pipe -O0 -arch ppc -fno-strict-aliasing -c -fno-builtin "clamscanS.c")
libtool: link: rm -f ".libs/clamscanS.c" ".libs/clamscan.nm" ".libs/clamscan.nmS" ".libs/clamscan.nmT" ".libs/clamscan.nmI"
libtool: link: /opt/local/bin/gcc-mp-7 -pipe -O0 -arch ppc -fno-strict-aliasing -Wl,-headerpad_max_install_names -arch ppc -o .libs/clamscan output.o getopt.o optparser.o actions.o misc.o clamscan.o manager.o  -L/opt/local/lib ../libclamav/.libs/libclamav.dylib /opt/local/lib/libiconv.dylib -ljson-c -lbz2 /opt/local/lib/libltdl.dylib /opt/local/lib/libxml2.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.102.4/libclamav/.libs/libclammspack.dylib -lssl -lcrypto -lz /opt/local/lib/libpcre2-8.dylib /opt/local/lib/libcharset.dylib -pthread
Undefined symbols:
  "_unlinkat", referenced from:
      _traverse_unlink in actions.o
  "_renameat", referenced from:
      _traverse_rename in actions.o
  "_openat", referenced from:
      _traverse_to in actions.o
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
make[2]: *** [clamscan] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.102.4/clamscan'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.102.4'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.102.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_clamav/clamav/work/clamav-0.102.4" && /usr/bin/make -w all 
Exit code: 2

Besides this, clamav does not compile with Apple's GCC on PPC Tiger but needs GCC7 or such.

Attachments (2)

main.log (554.8 KB) - added by ballapete (Peter "Pete" Dyballa) 4 years ago.
Main.log from PPC Tiger
main.2.log (579.8 KB) - added by ballapete (Peter "Pete" Dyballa) 4 years ago.
Main.log from PPC Leopard

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

It builds when PortGroup legacysupport 1.0 is added to Portfile.

comment:2 Changed 4 years ago by kencu (Ken)

thanks for sorting all that out.

comment:3 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

The same happens on PPC Leopard, Mac OS X 10.5.8. I'll try the legacy support…

Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.2.log added

Main.log from PPC Leopard

comment:4 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

The addition of PortGroup legacysupport 1.0 to Portfile allowed the recent version of clamav to build.

comment:5 Changed 4 years ago by kencu (Ken)

Cc: dluke@… kencu removed
Owner: set to danielluke
Status: newassigned

comment:6 Changed 4 years ago by kencu (Ken)

Keywords: tiger removed

comment:7 Changed 4 years ago by kencu (Ken)

Summary: clamav @0.102.4 does not build on PPC MacOS X 10.4.11, because of undefined symbols: "_unlinkat", "_renameat", "_openat"clamav @0.102.4 does not build on older systems because of undefined symbols: "_unlinkat", "_renameat", "_openat"

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

Resolution: fixed
Status: assignedclosed

comment:10 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Meanwhile

  clamav @0.103.0_0 (active) platform='darwin 8' archs='ppc' date='2020-09-16T11:41:39+0200'

built and installed and it also works.

Note: See TracTickets for help on using tickets.