# [SOLVED] problema di installazione sci-libs/fftw-3.3.6_p2

## marziods

Buongiorno, 

dopo qualche annetto e un po di arruginimento ho ripreso gentoo... ultimamente mi trovo in difficoltà con fftw... mi da sempre errore di compilazione ed esce dal'installazione.

ho provato a patchare... ma nulla... e non riesco nemmeno a capire chi lo voglia sto pacchetto che purtroppo mi costrignge ad ogni update allo --skipfirst.

any idea?

```
emerge --info '=sci-libs/fftw-3.3.6_p2::gentoo'

Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-6.4.0, glibc-2.25-r9, 4.12.12-gentoo x86_64)

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

                         System Settings

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

System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.4.1

KiB Mem:     8103096 total,   1305212 free

KiB Swap:    8841212 total,   8840772 free

Timestamp of repository gentoo: Mon, 27 Nov 2017 20:45:01 +0000

Head commit of repository gentoo: c38b31ea0c6f03294882011b19e820069f142332

sh bash 4.3_p48-r1

ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1

app-shells/bash:          4.3_p48-r1::gentoo

dev-java/java-config:     2.2.0-r3::gentoo

dev-lang/perl:            5.24.3::gentoo

dev-lang/python:          2.7.14::gentoo, 3.4.5::gentoo

dev-util/cmake:           3.8.2::gentoo

dev-util/pkgconfig:       0.29.2::gentoo

sys-apps/baselayout:      2.4.1-r2::gentoo

sys-apps/openrc:          0.34.10::gentoo

sys-apps/sandbox:         2.10-r4::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo

sys-devel/binutils:       2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo

sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo

sys-devel/gcc-config:     1.8-r1::gentoo

sys-devel/libtool:        2.4.6-r3::gentoo

sys-devel/make:           4.2.1::gentoo

sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.25-r9::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.fr.gentoo.org/gentoo-portage

    priority: -1000

    sync-rsync-extra-opts: 

vmware

    location: /var/lib/layman/vmware

    masters: gentoo

    priority: 50

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=corei7 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"

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

CXXFLAGS="-march=corei7 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"

LANG="it_IT.iso88591"

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

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_TMPDIR="/var/tmp"

USE="CPU_FLAGS_X86="aes X a52 aac acl acpi activities alsa amd64 assistant avx avx2 berkdb bluetooth branding bundled-libs bzip2 cairo cdda cdr cdrw cjk cli connection-sharing consolekit cracklib crypt cxx dbus declarative device-mapper dhclient dri dts dvd dvdr emboss encode exif fam fat ffmpeg firefox flac fma3 fortran gcj gdbm gif glamor gnutils gpm gtk iconv ipv6 jack java jpeg kde kipi kwallet lcms ldap libnotify lm_sensors lock lua lxde mad mikmod mmx mmxext mng modemmanager modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nsplugin nss ntfs ogg opengl openmp opensync pam pango pclmul pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt3support qt4 qt5 rar readline resolvconf script sdl seccomp semantic-desktop session spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3" startup-notification svg tcpd thunar tiff tk truetype udev udisks unicode upower usb vg vorbis widgets wifi wmv wxwidgets x264 xattr xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="it" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" XFCE_PLUGINS="brightness clock power trash" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

qui la parte finale del log di errore:

```
In file included from /var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/dft/simd/n1f.h:21:0,

                 from /var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/dft/simd/avx2/../common/n1fv_4.c:35,

                 from n1fv_4.c:3:

/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/simd-support/simd-avx2.h:43:2: error: #error "compiling simd-avx2.h without avx2 support"

 #error "compiling simd-avx2.h without avx2 support"

  ^~~~~

In file included from /var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/dft/simd/n1f.h:21:0,

                 from /var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/dft/simd/avx2/../common/n1fv_3.c:35,

                 from n1fv_3.c:3:

/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2/simd-support/simd-avx2.h:43:2: error: #error "compiling simd-avx2.h without avx2 support"

 #error "compiling simd-avx2.h without avx2 support"

  ^~~~~

make[5]: *** [Makefile:761: n1fv_4.lo] Error 1

make[5]: *** Waiting for unfinished jobs....

make[5]: *** [Makefile:761: n1fv_2.lo] Error 1

make[5]: *** [Makefile:761: n1fv_6.lo] Error 1

make[5]: *** [Makefile:761: n1fv_3.lo] Error 1

make[5]: *** [Makefile:761: n1fv_5.lo] Error 1

make[5]: Leaving directory '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64/dft/simd/avx2'

make[4]: *** [Makefile:514: all] Error 2

make[4]: Leaving directory '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64/dft/simd/avx2'

make[3]: *** [Makefile:394: all-recursive] Error 1

make[3]: Leaving directory '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64/dft/simd'

make[2]: *** [Makefile:505: all-recursive] Error 1

make[2]: Leaving directory '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64/dft'

make[1]: *** [Makefile:684: all-recursive] Error 1

make[1]: Leaving directory '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64'

make: *** [Makefile:549: all] Error 2

 * ERROR: sci-libs/fftw-3.3.6_p2::gentoo failed (compile phase):

 *   emake failed

 * 

 * If you need support, post the output of `emerge --info '=sci-libs/fftw-3.3.6_p2::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=sci-libs/fftw-3.3.6_p2::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/temp/environment'.

 * Working directory: '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2-single-abi_x86_64.amd64'

 * S: '/var/tmp/portage/sci-libs/fftw-3.3.6_p2/work/fftw-3.3.6-pl2'

```

Grazie per qualsiasi cazziata o suggerimento... (scusate ma ho perso mano... anzi mani  :Razz:  )

----------

## sabayonino

```
  #error "compiling simd-avx2.h without avx2 support" 
```

Le flags del pacchetto sono (nel mio caso):

```
# equery u fftw

[ Legend : U - final flag setting for installation]

[        : I - package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for sci-libs/fftw-3.3.6_p2:

 U I

 + + abi_x86_32         : 32-bit (x86) libraries

 + - cpu_flags_x86_avx  : Adds support for Advanced Vector Extensions instructions

 + - cpu_flags_x86_avx2 : Adds support for Advanced Vector Extensions 2 instructions

 - - cpu_flags_x86_fma3 : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)

 - - cpu_flags_x86_fma4 : Use the Fused Multiply Add 4 instruction set

 - + cpu_flags_x86_sse  : Use the SSE instruction set

 + + cpu_flags_x86_sse2 : Use the SSE2 instruction set

 - - doc                : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally

 + + fortran            : Add support for fortran

 - - mpi                : Add MPI (Message Passing Interface) layer to the apps that support it

 + + openmp             : Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp"

 - - quad               : Build quadruple precision lib

 - - static-libs        : Build static versions of dynamic libraries as well

 - - test               : Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in

                          make.conf/package.use anymore

 + + threads            : Add threads support for various packages. Usually pthreads

```

disabilita la flag interessata dal pacchetto (probabilmente la tua cpu non supporta l'istruzione avx2)

```
# euse -D avx2 -p sci-libs/fftw
```

ti suggerisco l'installazione di

```
# emerge app-portage/cpuid2cpuflags --ask
```

in pratica rileva le flags della cpu e le abilita/disabilita nel caso vengano richieste da qualche pacchetto

Esempio

```
# cpuid2cpuflags 

CPU_FLAGS_X86: aes avx f16c mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
```

e le aggiungi al make.conf

Esempio :

```
CPU_FLAGS_X86="sse2 avx avx2 sse4_1 sse4_2"
```

Ovviamente adatta il risultato con il tuo output

```
# emerge sci-libs/fftw --ask
```

----------

## fedeliallalinea

Puoi postare il tuo make.conf?

La linea

```
USE="CPU_FLAGS_X86="aes X a52 aac acl acpi activities alsa amd64 assistant avx avx2 berkdb bluetooth branding bundled-libs bzip2 cairo cdda cdr cdrw cjk cli connection-sharing consolekit cracklib crypt cxx dbus declarative device-mapper dhclient dri dts dvd dvdr emboss encode exif fam fat ffmpeg firefox flac fma3 fortran gcj gdbm gif glamor gnutils gpm gtk iconv ipv6 jack java jpeg kde kipi kwallet lcms ldap libnotify lm_sensors lock lua lxde mad mikmod mmx mmxext mng modemmanager modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nsplugin nss ntfs ogg opengl openmp opensync pam pango pclmul pcre pdf phonon plasma png policykit popcnt ppds pulseaudio qml qt3support qt4 qt5 rar readline resolvconf script sdl seccomp semantic-desktop session spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3" startup-notification svg tcpd thunar tiff tk truetype udev udisks unicode upower usb vg vorbis widgets wifi wmv wxwidgets x264 xattr xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
```

mi convince molto poco

----------

## sabayonino

CPU_FLAGS_X86="...."

è una variabile a parte non va inserita nella variabile USE   :Rolling Eyes: 

 *Quote:*   

> USE="CPU_FLAGS_X86="aes X a52 aac acl acpi activities alsa amd64 assistant avx avx2 ....

 

```
FLAGS="-Ofast -march=x86-64 -pipe -mfpmath=sse -fopenmp"

CHOST="x86_64-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

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

MAKEOPTS="-j8 -s"

CPU_FLAGS_X86="sse2 avx avx2 sse4_1 sse4_2"

...

```

----------

## marziods

 *fedeliallalinea wrote:*   

> Puoi postare il tuo make.conf?
> 
> La linea
> 
> ```
> ...

 

concordo ... convince molto poco... ma il mio make.conf pare regolare "a parte qualche refuso..."

```
# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /usr/share/portage/config/make.conf.example for a more

# detailed example.

CFLAGS="-march=corei7 -O2 -pipe"

CXXFLAGS="${CFLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.

# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.

CHOST="x86_64-pc-linux-gnu"

MAKEOPTS="-j5"

CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

# These are the USE and USE_EXPAND flags that were used for

# buidling in addition to what is provided by the profile.

# tolto static-libs

USE=    " X xorg udev ipv6 a52 aac acpi alsa assistant rar wmv branding \

        bluetooth bundled-libs cjk cairo cdda cdrw cdr -cups consolekit \

        dbus device-mapper dts dvd dvdr emboss encode exif fam fat flac \

        -aqua ffmpeg gcj gif -gnome gpm gtk gnutils jack jpeg java -libav \

        lcms lock lm_sensors ldap libnotify lua lxde mad mikmod mng mp3 \

        mp4 mpeg nsplugin nss ntfs ogg opengl opensync pango pdf png ppds \

        policykit pam pulseaudio sdl spell sqlite session \

        startup-notification tk tiff truetype thunar unicode usb vorbis \

        vg xcb x264 xml xinerama xulrunner xv xvid networkmanager \

        -bindist dhclient connection-sharing modemmanager resolvconf\

         ncurses wifi script "

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

XFCE_PLUGINS="brightness clock power trash"

LINGUAS="it"

L10N="it"

VIDEO_CARDS="intel i965"

INPUT_DEVICES="evdev synaptics"

ACCEPT_LICENSE=" * "

PORTAGE_ELOG_SYSTEM="save"

PORTAGE_ELOG_CLASSES="warn error info log qa"

GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"

```

sabayonino,

in realtà io ho usato 

```
cpuinfo2cpuflags-x86 

CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
```

e avx2 è supportato provo ad istallarlo senza....

ho tolto da CPU_FLAGS_X86= avx2 e l'installazione la fa...

ora... è possibile installare solo questo pacchetto senza avx2? euse non è utile allo scopo

----------

## sabayonino

l'ho scritto sopra

```
# euse -D avx2 -p sci-libs/fftw
```

per disabilitare avx2 solo per il pacchetto e non globalmente

riabilita avx2 in cpuflags , a certe applicazioni multimediali potrebbe far comodo  :Wink: 

----------

## marziods

 *sabayonino wrote:*   

> l'ho scritto sopra
> 
> ```
> # euse -D avx2 -p sci-libs/fftw
> ```
> ...

 

 avx2 non credo sia una USE ... 

il comando sopra infatti restituisce :

```
ERROR: USE flag "avx2" does not exist
```

mentre

```
#euse -i avx2 
```

non restitusci alcun risultato...

ci riusciremo!

----------

## sabayonino

cavolo è vero. mi è rimasta la USE dai tempi antichi quando le flags cpu venivano inserite in USE

allora basta toglierle dalla variabile CPU_  :Rolling Eyes: 

 :Shocked:   mi sa che devo fare un pà di pulizia   :Mr. Green: 

 :Shocked: 

cpuinfo2cpuflags-x86 

CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

```

sci-libs/fftw

3.3.6_p2(3.0/3) **9999(3.0/3)

       {altivec doc float fortran mpi neon openmp quad static-libs test threads zbus ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="avx avx2 fma3 fma4 sse sse2"}

     Installed versions:  3.3.6_p2(3.0)(01:14:58 19/10/2017)(fortran openmp threads -altivec -doc -mpi -neon -quad -static-libs -test -zbus ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" CPU_FLAGS_X86="avx avx2 fma3 sse sse2 -fma4")

     Homepage:            http://www.fftw.org/

     Description:         Fast C library for the Discrete Fourier Transform

```

avx2 è utilizzata in sci-libs/fftw (i7.4770) .

Misteri di portage

----------

## fedeliallalinea

```
USE=    " X xorg udev ipv6 a52 aac acpi alsa assistant rar wmv branding \ ....
```

Elimina gli spazi tra il segno uguale e le virgolette, questo non e' accettato in bash

```
$ TEST=     "aaaa"

bash: aaaa: command not found

$ TEST="aaaa"
```

----------

## marziods

 *fedeliallalinea wrote:*   

>  cut
> 
> Elimina gli spazi tra il segno uguale e le virgolette, questo non e' accettato in bash
> 
> cut
> ...

 

si lo avevo messo per leggibilità qui ma così nella realtà non funzionerebbe... 

esiste un modo per togliere un  una cpu flag solo per un pacchetto? tipo: 

```
euse -D USE mio/pacchetto
```

 per intenderci

scusate l'orario

mandi

----------

## fedeliallalinea

Si io faccio solitamente manualmente

```
# echo "mio/pacchetto -cpu_flags_x86_avx2" >> /etc/portage/package.use
```

CPU_FLAGS_X86 e' una use expand quindi per togliere una di queste basta mettere il nome della variabile in piccolo e poi quella che vuoi togliere separata da il carattere '_'

----------

## marziods

 *fedeliallalinea wrote:*   

> Si io faccio solitamente manualmente
> 
> ```
> # echo "mio/pacchetto -cpu_flags_x86_avx2" >> /etc/portage/package.use
> ```
> ...

 

mitico! grazie ...

cmq non capisco come mai non accetti il set di operazioni avx2 ... visto che lo include tra le flag!

tornerò attivo!  :Very Happy: 

----------

