View previous topic :: View next topic |
Author |
Message |
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Tue Sep 11, 2018 12:46 am Post subject: [Solved] aircrack-ng-1.3-r3 build fail |
|
|
I recently updated gcc to 7.3.0, and now I'm facing the following problem when building aircrack-ng.
Code: | memory.c: In function "dump_stuff_shammx":
memory.c:512:43: error: "SHA_BUF_SIZ" undeclared (first use in this function); did you mean "_G_BUFSIZ"?
+ (unsigned int) index / SIMD_COEF_32 * SHA_BUF_SIZ * 4 \
^
memory.c:668:42: note: in expansion of macro "SHAGETPOS"
printf("%.2x", ((unsigned char *) buf)[SHAGETPOS(i, index)]);
^~~~~~~~~
memory.c:512:43: note: each undeclared identifier is reported only once for each function it appears in
+ (unsigned int) index / SIMD_COEF_32 * SHA_BUF_SIZ * 4 \
^
memory.c:668:42: note: in expansion of macro "SHAGETPOS"
printf("%.2x", ((unsigned char *) buf)[SHAGETPOS(i, index)]);
^~~~~~~~~
memory.c: In function "dump_stuff_shammx64":
memory.c:536:43: error: "SHA_BUF_SIZ" undeclared (first use in this function); did you mean "_G_BUFSIZ"?
+ (unsigned int) index / SIMD_COEF_64 * SHA_BUF_SIZ * 8 * SIMD_COEF_64)
^
memory.c:705:42: note: in expansion of macro "SHA64GETPOS"
printf("%.2x", ((unsigned char *) buf)[SHA64GETPOS(i, index)]);
^~~~~~~~~~~
memory.c: In function "dump_stuff_mmx64":
memory.c:548:43: error: "SHA_BUF_SIZ" undeclared (first use in this function); did you mean "_G_BUFSIZ"?
+ (unsigned int) index / SIMD_COEF_64 * SHA_BUF_SIZ * 8 * SIMD_COEF_64)
^
memory.c:723:42: note: in expansion of macro "SHA64GETPOSne"
printf("%.2x", ((unsigned char *) buf)[SHA64GETPOSne(i, index)]);
^~~~~~~~~~~~~
|
I'd appreciate any suggestions on how to fix it.
__
sol
Last edited by solamour on Thu Oct 18, 2018 8:03 pm; edited 1 time in total |
|
Back to top |
|
|
Hieronymus Bosch Tux's lil' helper
Joined: 29 Jan 2015 Posts: 83 Location: 31°45′33.14″N 106°29′24.63″W
|
Posted: Tue Sep 11, 2018 12:58 am Post subject: |
|
|
After upgrading GCC, Did you rebuild sys-devel/libtool?
In the following link, they describe an issue with aircrac-ng:
https://github.com/aircrack-ng/aircrack-ng/issues/1872
I also have GCC 7.30, I will try to install it. _________________ Details fueled any investigation ... |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
|
Back to top |
|
|
Hieronymus Bosch Tux's lil' helper
Joined: 29 Jan 2015 Posts: 83 Location: 31°45′33.14″N 106°29′24.63″W
|
Posted: Tue Sep 11, 2018 1:17 am Post subject: |
|
|
I installed aircrack-ng without problem. _________________ Details fueled any investigation ... |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Tue Sep 11, 2018 1:26 am Post subject: |
|
|
Hieronymus Bosch wrote: | I installed aircrack-ng without problem. |
I tried on a different machine, and it too went well. The difference is, the problematic one is a museum-worthy 32-bit machine, and the other is equally classic but 64-bit.
Can't think of how to proceed from here.
__
sol |
|
Back to top |
|
|
Hieronymus Bosch Tux's lil' helper
Joined: 29 Jan 2015 Posts: 83 Location: 31°45′33.14″N 106°29′24.63″W
|
Posted: Tue Sep 11, 2018 1:31 am Post subject: |
|
|
Which version of aircrack-ng did you install? _________________ Details fueled any investigation ... |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Sep 11, 2018 12:50 pm Post subject: |
|
|
solamour wrote: | Hieronymus Bosch wrote: | I installed aircrack-ng without problem. |
I tried on a different machine, and it too went well. The difference is, the problematic one is a museum-worthy 32-bit machine, and the other is equally classic but 64-bit. |
solamour ... I don't think it's due to the host being 32bit, I can build here on x86 ... admittedly I'm using net-wireless/aircrack-ng-9999, but I've been building versions through the developement of 1.2 and 1.3 so and I'd have most probably hit the above if that were the case.
Based on the build failure I think your problem is that you have dev-libs/openssl-1.1 installed ... if so you should revert to 1.0.2p
HTH & best ... khay |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Wed Sep 12, 2018 12:51 am Post subject: |
|
|
khayyam wrote: | Based on the build failure I think your problem is that you have dev-libs/openssl-1.1 installed ... if so you should revert to 1.0.2p |
I do have dev-libs/openssl-1.0.2p.
Code: |
$ eix dev-libs/openssl
[?] dev-libs/openssl
Available versions:
(0.9.8) 0.9.8z_p8^d 0.9.8z_p8-r1^d
(0) 1.0.2o-r3^d ~1.0.2o-r6^d [M]~1.1.0h-r2(0/1.1)^d [M]**1.1.1_pre8(0/1.1)^d
{+asm bindist gmp kerberos rfc3779 sctp sslv2 (+)sslv3 static-libs test (+)tls-heartbeat vanilla zlib ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="sse2" ELIBC="musl"}
Installed versions: 1.0.2p^d(12:10:17 PM 09/02/2018)(asm sslv3 tls-heartbeat zlib -bindist -gmp -kerberos -rfc3779 -sctp -sslv2 -static-libs -test -vanilla ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 -64 -x32" CPU_FLAGS_X86="-sse2")
Homepage: https://www.openssl.org/
Description: full-strength general purpose cryptography library (including SSL and TLS)
|
As for aircrack-ng, it's 1.3 that is failing.
__
sol |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Sep 12, 2018 10:12 am Post subject: |
|
|
solamour ... that may make a difference, are you using the musl overlay, and which repo is aircrack-ng and openssl from?
solamour wrote: | Code: | CPU_FLAGS_X86="-sse2" |
|
You most likely do have sse2, I would suggest you set CPU_FLAGS_X86 either using app-portage/cpuid2cpuflags or by checking /proc/cpuinfo for available cpuflags. Not sure what effect building openssl without asm is, but it's possible you're missing some stuff because of this (ie, 'dump_stuff_mmx64' may be included when CPU_FLAGS_X86="mmx" is set).
Otherwise, post 'emerge --info', and pastebin the full build.log
best ... khay |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Wed Sep 12, 2018 10:44 pm Post subject: |
|
|
khayyam wrote: |
solamour ... that may make a difference, are you using the musl overlay, and which repo is aircrack-ng and openssl from?
|
Hmm... how do I know whether I'm using musl overlay or not? Also, I don't recall setting anything special for aircrack-ng and openssl, but just to be sure I'm not missing anything, let me know what to check.
khayyam wrote: | solamour wrote: | Code: | CPU_FLAGS_X86="-sse2" |
|
You most likely do have sse2, I would suggest you set CPU_FLAGS_X86 either using app-portage/cpuid2cpuflags or by checking /proc/cpuinfo for available cpuflags. |
This particular machine doesn't have "sse2". It's pretty old and woefully underpowered.
Code: |
$ cpuid2cpuflags
CPU_FLAGS_X86: 3dnow 3dnowext mmx mmxext
$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
cpu MHz : 499.870
cache size : 128 KB
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 sep pge cmov clflush mmx mmxext 3dnowext 3dnow eagerfpu 3dnowprefetch vmmcall
bugs : sysret_ss_attrs
bogomips : 999.74
clflush size : 32
cache_alignment : 32
address sizes : 32 bits physical, 32 bits virtual
power management:
|
emerge --info: https://pastebin.com/Y0WGbBH6
build.log: https://pastebin.com/bNxUZs9m
Purely out of curiosity, I tried building it from source (v1.3) as per https://www.aircrack-ng.org/doku.php?id=install_aircrack#installing_aircrack-ng_from_source, and that went OK, although I'm not sure how much difference is there between the source from aircrack-ng.org and portage.
__
sol |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Wed Sep 12, 2018 11:33 pm Post subject: |
|
|
khayyam wrote: | solamour ... that may make a difference, are you using the musl overlay, and which repo is aircrack-ng and openssl from?
|
solamour wrote: | Hmm... how do I know whether I'm using musl overlay or not? Also, I don't recall setting anything special for aircrack-ng and openssl, but just to be sure I'm not missing anything, let me know what to check. |
solamour ... my musl install is woefuly neglected, probably the last time I booted it was over a year ago. At that time, and as per the musl instructions, you needed to have the musl overlay so that you would pick up changes (build fixes, etc) not yet included in ::gentoo. I don't imagine that's changed, and you'd know because you'd have added the overlay, and would see it listed in the output of 'emerge --info'. There are various ways you can check what repo the package was installed from
Code: | % /var/db/pkg/net-wireless/aircrack-ng-9999/repository
gentoo |
... or you can get a list of all packages from ::musl using 'eix':
Code: | % eix --only-names --installed-from-overlay musl |
solamour wrote: | Code: | CPU_FLAGS_X86="-sse2" |
|
khayyam wrote: | You most likely do have sse2, I would suggest you set CPU_FLAGS_X86 either using app-portage/cpuid2cpuflags or by checking /proc/cpuinfo for available cpuflags. |
solamour wrote: | This particular machine doesn't have "sse2". It's pretty old and woefully underpowered. |
I see, obviously it's optional but in the absence of anything else to go on it does seem that its openssl's asm that aircrack-ng is failing on ... and so its worth adding the flags generated by cpuid2cpuflags, and I'm not sure you need to negate -sse (at least this is the case for all other flags).
In which case I'm at a loss to explain why the ebuild fails. Do you set MAKEOPTS="-j1" ... given how "underpowered" this AMD is?
best ... khay |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Fri Sep 14, 2018 12:24 am Post subject: |
|
|
MAKEOPTS="-j1" is already set. "/var/db/pkg/net-wireless/aircrack-ng-1.2_rc1-r1/repository" is "gentoo", and "eix --only-names --installed-from-overlay musl" doesn't show anything. Tried adding "sse2", but that didn't make any difference either.
When I run "./configure --with-experimental" in the source I downloaded, I see the following.
Code: | aircrack-ng 1.3
Build Environment:
Build Machine: i586-pc-linux-gnu
Host Machine: i586-pc-linux-gnu
Target Machine: i586-pc-linux-gnu
Install Prefix: /usr/local
Compiler Environment:
C Compiler: gcc
C++ Compiler: g++
Python: /usr/bin/python3
CFLAGS:
CXXFLAGS:
CPPFLAGS: -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
LDFLAGS:
LIBS: -ldl -lm
Optimized CFLAGS: -Wall -O3 -std=gnu99 -fvisibility=hidden -Wstrict-prototypes -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds
Optimized CXXFLAGS: -Wall -O3 -fvisibility=hidden -Wstrict-prototypes -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -masm=intel
Optimized CPPFLAGS:
Optimized LIBS:
Target Environment:
OS: linux
ASAN: no
Crypto Libraries:
Gcrypt:
OpenSSL: -lcrypto
Required Libraries:
Ethtool: yes, found /usr/sbin/ethtool
Libnl: yes, found libnl-3.0
Optional Libraries:
Airpcap: no
Cmocka: no
DUMA: no
Jemalloc: no
Pcap: yes
Pcre: yes
Sqlite: yes
Tcmalloc: no
Zlib: yes
Features:
Experimental Extra Scripts: no
Experimental Features: yes
|
And the following is from portage.
Code: | aircrack-ng 1.3
Build Environment:
Build Machine: i486-pc-linux-gnu
Host Machine: i486-pc-linux-gnu
Target Machine: i486-pc-linux-gnu
Install Prefix: /usr
Compiler Environment:
C Compiler: i486-pc-linux-gnu-gcc
C++ Compiler: i486-pc-linux-gnu-g++
Python: /usr/bin/python3
CFLAGS: -march=geode
CXXFLAGS: -march=geode
CPPFLAGS: -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
LDFLAGS: -Wl,-O1 -Wl,--as-needed
LIBS: -ldl -lm
Optimized CFLAGS: -Wall -std=gnu99 -fvisibility=hidden -Wstrict-prototypes -Wno-unused-but-set-variable -Wno-array-bounds
Optimized CXXFLAGS: -Wall -fvisibility=hidden -Wstrict-prototypes -Wno-unused-but-set-variable -Wno-array-bounds -masm=intel
Optimized CPPFLAGS:
Optimized LIBS:
Target Environment:
OS: linux
ASAN: no
Crypto Libraries:
Gcrypt:
OpenSSL: -lcrypto
Required Libraries:
Ethtool: yes, found /usr/sbin/ethtool
Libnl: yes, found libnl-3.0
Optional Libraries:
Airpcap: no
Cmocka: no
DUMA: no
Jemalloc: no
Pcap: yes
Pcre: yes
Sqlite: yes
Tcmalloc: no
Zlib: yes
Features:
Experimental Extra Scripts: no
Experimental Features: yes
|
I see "i586-pc-linux-gnu" (working) and "i486-pc-linux-gnu" (not working), but I'm slightly hesitant to change CHOST, because, well, it would take an awful long time to rebuild all the necessary tools.
__
sol |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Sep 14, 2018 1:53 pm Post subject: |
|
|
solamour wrote: | [...] and "eix --only-names --installed-from-overlay musl" doesn't show anything. |
solamour ... in which case you most likely don't have the musl overlay ('emerge --info' will clarify that), and by the musl wiki page you should.
solamour wrote: | I see "i586-pc-linux-gnu" (working) and "i486-pc-linux-gnu" (not working), but I'm slightly hesitant to change CHOST, because, well, it would take an awful long time to rebuild all the necessary tools. |
You can't change CHOST, not unless you're building/rebuilding from a stage1. In terms of difference I'm more inclined to see '-fstack-protector-strong', though I'm not sure what effect this would have if not passed (because afaik gcc is built with '--enable-default-ssp'). Anyhow, I have to ask, have you switched to 17.0 profiles, and rebuilt the toolchain and @world?
best ... khay |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Fri Sep 14, 2018 7:38 pm Post subject: |
|
|
khayyam wrote: | Anyhow, I have to ask, have you switched to 17.0 profiles, and rebuilt the toolchain and @world? |
The profile is set to "default/linux/x86/17.0 (stable)", and I rebuilt "libtool", but I didn't update @world, because it would take a few weeks to finish, even though the system doesn't have a lot of things installed. Besides, it's a mission-critical system (well, it's mission-critical to me), so I really can't afford to mess it up. I can build the same system in a more modern machine and transfer it, and perhaps that's my next step. At the same time, I'd like to avoid such a drastic measure if possible at all, so if you can suggest packages (rather then the whole world) I should try rebuilding, I'd like to give it a try as well.
__
sol |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Fri Sep 14, 2018 8:31 pm Post subject: |
|
|
khayyam wrote: | Anyhow, I have to ask, have you switched to 17.0 profiles, and rebuilt the toolchain and @world? |
solamour wrote: | The profile is set to "default/linux/x86/17.0 (stable)", and I rebuilt "libtool", but I didn't update @world, because it would take a few weeks to finish, even though the system doesn't have a lot of things installed. Besides, it's a mission-critical system (well, it's mission-critical to me), so I really can't afford to mess it up. I can build the same system in a more modern machine and transfer it, and perhaps that's my next step. At the same time, I'd like to avoid such a drastic measure if possible at all, so if you can suggest packages (rather then the whole world) I should try rebuilding, I'd like to give it a try as well. |
solamour ... this is probably the crux of the issue, you must rebuild a number of packages (specifically libs) subsequent to the profile changes ... at minimum you should do the following:
Code: | # eselect profile set default/linux/x86/17.0
# . /etc/profile
# emerge --oneshot sys-devel/gcc && emerge --oneshot sys-devel/libtool && emerge --oneshot sys-devel/binutils && emerge --oneshot sys-libs/glibc && emerge --oneshot /lib*/**.a /usr/lib*/**.a --exclude sys-libs/glibc |
best ... khay |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Sun Sep 16, 2018 4:55 am Post subject: |
|
|
khayyam wrote: | this is probably the crux of the issue, you must rebuild a number of packages (specifically libs) subsequent to the profile changes ... at minimum you should do the following:
Code: | # eselect profile set default/linux/x86/17.0
# . /etc/profile
# emerge --oneshot sys-devel/gcc && emerge --oneshot sys-devel/libtool && emerge --oneshot sys-devel/binutils && emerge --oneshot sys-libs/glibc && emerge --oneshot /lib*/**.a /usr/lib*/**.a --exclude sys-libs/glibc |
|
Great suggestion, and I'll make a note of it.
In the mean time, I created a virtual machine (with the same settings as my underpowered box) in a reasonably recent machine. I installed only the bare minimum tools that I needed, and when I tried to install aircrack-ng, the following packages were added.
Code: | CHOST="i486-pc-linux-gnu"
CFLAGS="-march=geode -Os -mmmx -m3dnow -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext"
MAKEOPTS="-j1"
USE=""
CURL_SSL="gnutls"
GRUB_PLATFORMS="pc" |
Code: | [ebuild N ] dev-libs/libnl-3.4.0:3::gentoo USE="debug threads -python -static-libs -utils" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5" 912 KiB
[ebuild N ] virtual/libudev-232:0/1::gentoo USE="-static-libs -systemd" 0 KiB
[ebuild N ] dev-db/sqlite-3.24.0:3::gentoo USE="readline -debug -doc -icu -secure-delete -static-libs -tcl {-test} -tools" 2,636 KiB
[ebuild N ] net-wireless/wireless-tools-30_pre9::gentoo USE="-multicall" 341 KiB
[ebuild N ] sys-apps/ethtool-4.13::gentoo 213 KiB
[ebuild N ] net-libs/libpcap-1.8.1::gentoo USE="-bluetooth -dbus -netlink -static-libs -usb" 736 KiB
[ebuild N ] net-wireless/iw-4.9::gentoo 104 KiB
[ebuild N ] sys-apps/pciutils-3.5.6::gentoo USE="kmod udev zlib -dns -static-libs" 432 KiB
[ebuild N ] dev-libs/libusb-1.0.21:1::gentoo USE="-debug -doc -examples -static-libs {-test} -udev" 594 KiB
[ebuild N ] net-wireless/lorcon-0.0_p20150109::gentoo USE="python" PYTHON_TARGETS="python2_7" 254 KiB
[ebuild N ] virtual/libusb-1-r2:1::gentoo USE="-udev" 0 KiB
[ebuild N ] sys-apps/usbutils-009::gentoo USE="-python" PYTHON_TARGETS="python2_7" 303 KiB
[ebuild N ] net-wireless/aircrack-ng-1.3-r3::gentoo USE="airdrop-ng airgraph-ng experimental netlink pcre sqlite -libressl" PYTHON_TARGETS="python2_7" 4,397 KiB |
Unfortunately, I was greeted with the same "error: ‘SHA_BUF_SIZ’ undeclared (first use in this function); did you mean ‘_G_BUFSIZ’?", so I'm not confident rebuilding gcc and its friends would have made any differences.
__
sol |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 698 Location: San Diego, CA
|
Posted: Thu Oct 18, 2018 8:03 pm Post subject: |
|
|
"aircrack-ng-1.4" worked. No more build errors, although it's still masked, so I had to add "net-wireless/aircrack-ng ~x86" to install it. Good enough for me.
Thanks everyone for taking time to share your thoughts and suggestions.
__
sol |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|