LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-04-2018, 06:17 AM   #1
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Rep: Reputation: Disabled
Red face aircrack-ng installation error: undefined reference to 'cpuinfo' please help...


I am using Fedora 27, I want to compile aircrack-ng-1.2-rc4 from the source since the yum and dnf installation has some bugs specially on airodump and airbase.

below are the output and errors when I enter make command...

[root@fedora aircrack-ng-1.2-rc4]# make
make -C src all
make[1]: Entering directory '/home/aircrack-ng-1.2-rc4/src'
gcc -g -w -Wall -O3 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude crypto.o common.o uniqueiv.o aircrack-ptw-lib.o memory.o simd-intrinsics.o aircrack-ng-core.o wpapsk-simd.o sha1-sse2.S -o aircrack-ng-simd -lpthread -lssl -lcrypto -lstdc++ liblinecount.a
aircrack-ng-core.o: In function `crack_wpa_thread':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuid_simdsize'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4128: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4131: undefined reference to `cpuinfo'
aircrack-ng-core.o:/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4221: more undefined references to `cpuinfo' follow
aircrack-ng-core.o: In function `main':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:5217: undefined reference to `cpuid_getinfo'
wpapsk-simd.o: In function `init_wpapsk':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:518: undefined reference to `cpuinfo'
wpapsk-simd.o: In function `wpapsk_sse':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:218: undefined reference to `cpuinfo'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:186: aircrack-ng-simd] Error 1
make[1]: Leaving directory '/home/aircrack-ng-1.2-rc4/src'
make: *** [Makefile:25: all] Error 2

Last edited by toshi382; 01-04-2018 at 08:41 PM.
 
Old 01-04-2018, 06:36 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,662

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by toshi382 View Post
[root@fedora aircrack-ng-1.2-rc4]# make
make -C src all
make[1]: Entering directory '/home/aircrack-ng-1.2-rc4/src'
gcc -g -w -Wall -O3 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude crypto.o common.o uniqueiv.o aircrack-ptw-lib.o memory.o simd-intrinsics.o aircrack-ng-core.o wpapsk-simd.o sha1-sse2.S -o aircrack-ng-simd -lpthread -lssl -lcrypto -lstdc++ liblinecount.a
aircrack-ng-core.o: In function `crack_wpa_thread':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuid_simdsize'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4128: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4131: undefined reference to `cpuinfo'
aircrack-ng-core.o:/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4221: more undefined references to `cpuinfo' follow
aircrack-ng-core.o: In function `main':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:5217: undefined reference to `cpuid_getinfo'
wpapsk-simd.o: In function `init_wpapsk':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:518: undefined reference to `cpuinfo'
wpapsk-simd.o: In function `wpapsk_sse':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:218: undefined reference to `cpuinfo'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:186: aircrack-ng-simd] Error 1
make[1]: Leaving directory '/home/aircrack-ng-1.2-rc4/src'
make: *** [Makefile:25: all] Error 2
Read the "Question Guidelines" link in my posting signature; without details, no one can help you.

You say nothing about version/distro of Linux, which is important, since the missing package name will vary by distro. Further, the software you're trying to compile is probably already available as a package...which we can't tell you how to find/install because we know nothing about your setup. Also, doing basic research first is a good thing, since the very error you mention has been filed as a bug-report:
https://github.com/aircrack-ng/aircrack-ng/issues/155
 
Old 01-04-2018, 03:57 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
toshi382, hello and welcome to LQ.

Have you ever compiled from source? What is your skill level?
 
Old 01-04-2018, 08:32 PM   #4
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hello,

Sorry for the incompleteness.

I am using Fedora 27, I want to compile aircrack-ng-1.2-rc4 from the source since the yum and dnf installation has some bugs specially on airodump and airbase.

Yes I am new with Linux so I need your guidance about this problem. Thanks.
 
Old 01-04-2018, 08:43 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I have a lot of questions here, you have a lot going on.

FC27 is pretty new. Usually when you get a new distro you also have to put in a lot of development support. A default install usually won't let you build from source. Do you have some web site or tutorial that tells you how to set up a build environment?


I see an .rpm listed here. Have you tried it? https://rpmfind.net/linux/rpm2html/s...ry=aircrack-ng
I assume it is the same as https://fedora.pkgs.org/27/fedora-x8...86_64.rpm.html

Might be better plan easier to just get a distro that doesn't have problems if you really want to use this program.

What issues with this do you have by the way, it may have nothing to do with this program. As you can see however it is an RC release. Unstable.
 
Old 01-04-2018, 09:02 PM   #6
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I already installed the rpm. However, same error with the yum and dnf installation.

Airodump and airbase don't work with this installation because my laptop does not support AVX instruction.

Aircrack wiki suggested that I need to compile from the source and edit some of its configuration and source file before installation.

So I need to know what is an undefined reference to 'cpuinfo' mean...
 
Old 01-04-2018, 10:19 PM   #7
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
Quote:
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038
Most likely line 4038 in file /home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c

Have you checked out with geany for example what that line does?

--

I have a reason why I use gentoo, It ships with a working toolchain. I wanted to do the same with ubuntu many years ago and ditched that for obvious reasons.

And some stuff does not compile from git and other stuff. I usually only build from git or use gentoo based packages, or gentoo overlay packages. IF I do not find it there it is usually some git stuff. And that only sometimes build. some stuff needs a lot of patches or is not proplery coded. happened several times.

--

Have you reported back to your distro, so they may fix your issue?
 
Old 01-04-2018, 10:28 PM   #8
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
yes, I already replaced the file aircrack-ng.c with the latest git source code. I reported this issue to aircrack-ng.org. But no replies yet.
 
Old 01-05-2018, 01:20 AM   #9
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
https://github.com/aircrack-ng/aircr.../aircrack-ng.c
Quote:
#if defined(__i386__) || defined(__x86_64__)
// Set SIMD size to match what we can support, 1/4/8 (MMX/SSE2/AVX2)
cpuinfo.simdsize = cpuid_simdsize(0);

// if (shasse2_cpuid()>=2)
// nparallel = 4;
#else
cpuinfo.simdsize = 1;
#endif
https://en.wikipedia.org/wiki/SIMD

When you know what you are doing you could set that by hand in the code.

Could be interesting where the issue is at the end.



Quote:
model name : Intel(R) Pentium(R) CPU N3700 @ 1.60GHz
Quote:
[toshi82@fedora ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)
Just a suggestion:

Have you tried to set active the else path? does it run than?

Quote:
cpuinfo.simdsize = 1;
and "deactivate" the other stuff from the if statement?

Last edited by _roman_; 01-05-2018 at 01:34 AM.
 
Old 01-05-2018, 06:04 AM   #10
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I tried to deactivate other stuff but it gives the same result...
 
Old 01-05-2018, 08:18 AM   #11
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
I think I solved the

Quote:
undefined reference to 'cpuinfo'
by declaring

Quote:
struct _cpuinfo cpuinfo;
in aircrack-ng.h

However, I cannot solved the problem on the following error lines

Quote:
aircrack-ng-core.o: In function `crack_wpa_thread':
/home/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4039: undefined reference to `cpuid_simdsize'
aircrack-ng-core.o: In function `main':
/home/aircrack-ng-1.2-rc4/src/aircrack-ng.c:5218: undefined reference to `cpuid_getinfo'
 
Old 01-05-2018, 08:29 AM   #12
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 54
Quote:
Originally Posted by toshi382 View Post
I am using Fedora 27, I want to compile aircrack-ng-1.2-rc4 from the source since the yum and dnf installation has some bugs specially on airodump and airbase.

below are the output and errors when I enter make command...

[root@fedora aircrack-ng-1.2-rc4]# make
make -C src all
make[1]: Entering directory '/home/aircrack-ng-1.2-rc4/src'
gcc -g -w -Wall -O3 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude crypto.o common.o uniqueiv.o aircrack-ptw-lib.o memory.o simd-intrinsics.o aircrack-ng-core.o wpapsk-simd.o sha1-sse2.S -o aircrack-ng-simd -lpthread -lssl -lcrypto -lstdc++ liblinecount.a
aircrack-ng-core.o: In function `crack_wpa_thread':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuid_simdsize'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4038: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4088: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4128: undefined reference to `cpuinfo'
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4131: undefined reference to `cpuinfo'
aircrack-ng-core.o:/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:4221: more undefined references to `cpuinfo' follow
aircrack-ng-core.o: In function `main':
/home/toshi82/aircrack-ng-1.2-rc4/src/aircrack-ng.c:5217: undefined reference to `cpuid_getinfo'
wpapsk-simd.o: In function `init_wpapsk':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:518: undefined reference to `cpuinfo'
wpapsk-simd.o: In function `wpapsk_sse':
/home/toshi82/aircrack-ng-1.2-rc4/src/wpapsk.c:218: undefined reference to `cpuinfo'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:186: aircrack-ng-simd] Error 1
make[1]: Leaving directory '/home/aircrack-ng-1.2-rc4/src'
make: *** [Makefile:25: all] Error 2
I just downloaded aircrack-ng-1.2-rc4 and it compiled ok on
my linuxfromscratch system here. Did you edit the make file
before you ran make? I'm asking because your compile attempt
seems to be missing a step. On my first attempt make ran
"autocfg" while your output shows yours did not. Here's mine:
Code:
terry [ /sources/blfs/sources/xc/aircrack-ng-1.2-rc4 ]$ make
make -C src all
make[1]: Entering directory '/sources/blfs/sources/xc/aircrack-ng-1.2-rc4/src'
sh ../autocfg gcc ..
gcc -g -W -Wall -O3  -mavx -DJOHN_AVX -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -Iinclude -DSIMD_CORE   -c -o aircrack-ng.o aircrack-ng.c
....more stuff here
Notice the "sh ../autocfg gcc .."
I don't know if that's part of your problem but I thought
I'd point it out to you. By the way, I did a make clean
and reran make and the autocfg did not get run the 2nd
time so it only happens at the first make.
 
Old 01-05-2018, 09:46 PM   #13
toshi382
LQ Newbie
 
Registered: Jan 2018
Posts: 7

Original Poster
Rep: Reputation: Disabled
Guys I found the problem.

I edited the MULTIBIN in the common.mak and change the value to "true" as suggested in https://aircrack-ng.blogspot.com/201...rovements.html for non-AVX unit. However, changing the MULTIBIN value into "true" will result to the error presented above. So, changing the vlaue of MULTIBIN is not a good idea IMO.

Thanks guys... Solve...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference error jacques83 Programming 20 04-11-2013 07:23 AM
Undefined Reference error JMJ_coder Programming 6 03-20-2008 01:27 AM
undefined reference to error in C++ knobby67 Programming 3 01-19-2008 10:34 PM
undefined reference error ilnli Programming 2 08-02-2007 08:34 PM
undefined reference error bahadur Programming 5 07-25-2006 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration