# p3scan fails to compile

## tempix

I have just updated to openssl-1.0.0a-r3 and 

will make a revdep-rebuild against the old openssl libraries.

emerge p3scan dies:

 * p3scan-2.3.1.tar.gz RMD160 SHA1 SHA256 size  :Wink:  ...                   [ ok ]

 * checking ebuild checksums  :Wink:  ...                                     [ ok ]

 * checking auxfile checksums  :Wink:  ...                                    [ ok ]

 * checking miscfile checksums  :Wink:  ...                                   [ ok ]

 * CPV:  mail-filter/p3scan-2.3.1

 * REPO: gentoo

 * USE:  elibc_glibc kernel_linux userland_GNU x86

>>> Unpacking source...

>>> Unpacking p3scan-2.3.1.tar.gz to /var/tmp/portage/mail-filter/p3scan-2.3.1/work

>>> Source unpacked in /var/tmp/portage/mail-filter/p3scan-2.3.1/work

>>> Compiling source in /var/tmp/portage/mail-filter/p3scan-2.3.1/work/p3scan-2.3.1 ...

make -j2

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c getlinep3.c

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c getline_ssl.c

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c parsefile.c

getline_ssl.c: In Funktion »initialize_ctx«:

getline_ssl.c:64: Warnung: Zuweisung streicht Qualifizierer von Zeiger-Zieltyp

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c p3scan.c

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c scanner_basic.c

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c scanner_avpd.c

In file included from /usr/include/fcntl.h:217,

                 from p3scan.c:48:

In Funktion »open«,

    eingefügt von »p3_mkstemp« bei p3scan.c:360:

/usr/include/bits/fcntl2.h:45: Fehler: Aufruf von »__open_too_many_args« mit Attributfehler deklariert: open can be called either with 2 or 3 arguments, not more

p3scan.c: In Funktion »set_defaultparams«:

p3scan.c:1170: Warnung: Feldindex ist oberhalb der Feldgrenzen

gcc -Wall -O2 -DLOGOPT="LOG_PID|LOG_CONS" -DLOGFAC="LOG_DAEMON" -c scanner_avpd_new.c

make: *** [p3scan.o] Fehler 1

make: *** Warte auf noch nicht beendete Prozesse...

 * ERROR: mail-filter/p3scan-2.3.1 failed:

 *   (no error message)

 *

 * Call stack:

 *     ebuild.sh, line  54:  Called src_compile

 *   environment, line 2298:  Called die

 * The specific snippet of code:

 *       emake || die

 *

 * If you need support, post the output of 'emerge --info =mail-filter/p3scan-2.3.1',

 * the complete build log and the output of 'emerge -pqv =mail-filter/p3scan-2.3.1'.

 * The complete build log is located at '/var/tmp/portage/mail-filter/p3scan-2.3.1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/mail-filter/p3scan-2.3.1/temp/environment'.

 * S: '/var/tmp/portage/mail-filter/p3scan-2.3.1/work/p3scan-2.3.1'

(The ~ version of p3scan dies too, but other error)

Portage 2.1.8.3 (hardened/linux/x86/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.32-hardened-r9 i686)

=================================================================

System uname: Linux-2.6.32-hardened-r9-i686-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-1.12.14

Timestamp of tree: Thu, 11 Nov 2010 22:00:01 +0000

app-shells/bash:     4.1_p7

dev-lang/python:     2.6.5-r3, 3.1.2-r4

sys-apps/baselayout: 1.12.14-r1

sys-apps/sandbox:    2.3-r1

sys-devel/autoconf:  2.13, 2.65-r1

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1

sys-devel/binutils:  2.20.1-r1

sys-devel/gcc:       4.4.4-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.10

sys-devel/make:      3.81-r2

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="* -@EULA"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -mno-tls-direct-seg-refs"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /var/bind"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -mno-tls-direct-seg-refs"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news paralell-fetch parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"

LANG="de_DE.UTF-8"

LC_ALL="de_DE.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LINGUAS="de en"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="acl bzip2 clamav cli cracklib crypt cups curl cxx dri gdbm gmp hardened iconv logrotate mmx modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pic png pppd python readline sasl session slang sse2 ssl symlink sysfs tcpd threads unicode urandom userlocales utf8 x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1   emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel  mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage      siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware        voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Thanks.

----------

## tempix

Okey,

the problem is in p3scan.c @ line 360. 

fcntl.h becomes 4 args! If I remove the last one: 0600, it compiles fine.

Please fix it.

----------

## Hu

 *tempix wrote:*   

> Please fix it.

 This is not the place to report problems with packages that are guaranteed to fail.  For that, you should file a bug.  Include the exact version which failed, the output of emerge --info, and a build log showing the failure.  When generating the build log, run emerge with LC_ALL=C so that the error messages are in English.

Since you said the ~arch version fails with a different error, it might be more useful to report that error, so that the ~arch version can be fixed and promoted to stable.

----------

