Building OpenWRT packages on Apple M1 not selecting ARM - router

When trying to build the openWRT package on M1 cpu, cannot determine bitness.
checking whether to install , and ... yes
checking for working const... yes
checking for off_t... yes
checking for size_t... yes
checking size of short... 0
checking size of int... 0
checking size of long... 0
checking size of long long... 0
checking size of __int64... 0
checking for 64-bit integer... no
checking for 32-bit integer... no
configure: error: neither int nor long is 32-bit
make[2]: *** [/Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/.configured] Error 1
make[2]: Leaving directory `/Volumes/OpenWrt/openwrt/tools/libelf'
time: tools/libelf/compile#0.36#0.35#0.97
make[1]: *** [tools/libelf/compile] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/openwrt'
make: *** [tools/install] Error 2

Related

Buildroot not compiling

every time I run make
it starts compiling but then stops and tells me this:
tmp-divrem_1.s:130: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:146: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:159: Error: selected processor does not support `mls r1,r4,r8,r11' in ARM mode
tmp-divrem_1.s:176: Error: selected processor does not support `mls r1,r4,r3,r8' in ARM mode
tmp-divrem_1.s:210: Error: selected processor does not support `mls r11,r4,r12,r3' in ARM mode
make[3]: *** [Makefile:768: divrem_1.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile: /usr/bin/gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_fib2_ui -I/home/pi/buildroot/output/host/include -O2 -I/home/pi/buildroot/output/host/include -c fib2_ui.c -fPIC -DPIC -o .libs/fib2_ui.o
make[3]: Leaving directory '/home/pi/buildroot/output/build/host-gmp-6.2.1/mpn'
make[2]: *** [Makefile:997: all-recursive] Error 1
make[2]: Leaving directory '/home/pi/buildroot/output/build/host-gmp-6.2.1'
make[1]: *** [Makefile:787: all] Error 2
make[1]: Leaving directory '/home/pi/buildroot/output/build/host-gmp-6.2.1'
make: *** [package/pkg-generic.mk:250: /home/pi/buildroot/output/build/host-gmp-6.2.1/.stamp_built] Error 2```
From the config it looks like you're compiling for i586, not arm or aarch64.
If you type make list-defconfigs, then it will show you a list; here's an excerpt:
raspberrypi2_defconfig - Build for raspberrypi2
raspberrypi4_64_defconfig - Build for raspberrypi4_64
raspberrypi4_defconfig - Build for raspberrypi4
sheevaplug_defconfig - Build for sheevaplug
Once you have identified the defconfig you need, then you can do this:
make raspberrypi4_defconfig
and it'll initialize a basic configuration for the selected target. With this configuration, your compilation should run to completion.

configure//make error on Ubuntu Pjsip PJproject

I am trying to extract opus rtp packets and convert them into wav format from the pcap file. In order to do so, I installed pjproject2.6 using the following commands:
cd pjproject2.6/
./configure
make dep && make
After the last command, I ran into the following error:
In file included from /usr/include/c++/7/cmath:47:0,
from /usr/include/c++/7/math.h:36,
from ../../yuv/source/compare.cc:14:
/usr/include/c++/7/bits/std_abs.h: In function ‘constexpr long double std::abs(long double)’:
/usr/include/c++/7/bits/std_abs.h:78:22: error: x87 register return with x87 disabled
abs(long double __x)
^
/home/administrator/pjproject-2.6/build/rules.mak:178: recipe for target 'output/libyuv-x86_64-unknown-linux-gnu/compare.o' failed
make[3]: *** [output/libyuv-x86_64-unknown-linux-gnu/compare.o] Error 1
make[3]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build/yuv'
Makefile:100: recipe for target 'libyuv-x86_64-unknown-linux-gnu.a' failed
make[2]: *** [libyuv-x86_64-unknown-linux-gnu.a] Error 2
make[2]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build/yuv'
Makefile:7: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/administrator/pjproject-2.6/third_party/build'
Makefile:14: recipe for target 'all' failed
make: *** [all] Error 1
Any suggestions? Thanks in advance!

DPDK cannot find -lnuma

While compiling the dpdk 17.04 version, i'm getting following error at the end.
== Build drivers/event/skeleton
== Build drivers/event/sw
== Build drivers/event/octeontx
== Build app
== Build app/test-pmd
LD testpmd
/usr/bin/ld: cannot find -lnuma
collect2: error: ld returned 1 exit status
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.app.mk:280: recipe for target 'testpmd' failed
make[5]: *** [testpmd] Error 1
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.subdir.mk:63: recipe for target 'test-pmd' failed
make[4]: *** [test-pmd] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkbuild.mk:76: recipe for target 'app' failed
make[3]: *** [app] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkroot.mk:128: recipe for target 'all' failed
make[2]: *** [all] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkinstall.mk:85: recipe for target 'pre_install' failed
make[1]: *** [pre_install] Error 2
/home/root1/dpdk/dpdk-stable-17.08.1/mk/rte.sdkroot.mk:107: recipe for target 'install' failed
make: *** [install] Error 2
Please suggest the solution.
DPDK requires libnuma-devel as described in System Requirements:
http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html
Libnuma packages are optional build dependency. You can disable the same by editing the RTE_TARGET config file. So you can either install libnuma-dev package or disable on target. Please do the need ful

Error build exmaple with WICED SDK

I compile an example in WICED SDK 3.5.2 by command:
./make snip.scan-BCM943362WCD4
And it shows this error:
MAKEFILE MAKECMDGOALS=snip.scan-BCM943362WCD4 OTA2_SUPPORT is disabled
Building Bootloader
WICED/platform/GCC/math_newlib.c: In function 'sin':
WICED/platform/GCC/math_newlib.c:30:5: internal compiler error: Illegal instruction
x -= ( (int) ( x / ( 2 * PI ) ) ) * 2 * PI;
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [build/waf.bootloader-NoOS-BCM943362WCD4/Modules/WICED/platform/GCC/math_newlib.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [main_app] Error 2
make[1]: *** [bootloader] Error 2
make: *** [main_app] Error 2
what should i try to fix it? thks
I had this problem on a 64-bit Linux system. It means that "as" or some other tool in the bundled GNU toolchain encounters an illegal instruction.
So they've been built for a newer host CPU than the one you happen to have. I managed to get around it by moving tools/ARM_GNU/bin/Linux64 out of the way, then creating a symlink from Linux64 to Linux32.

Building iPhone for WindowsXP with Cygwin

"Write native iPhone applications using Eclipse
CDT
How Windows and Linux developers can bypass the iPhone
SDK and write iPhone apps using open source tools"
by PJ Cabrera (pjcabrera#pobox.com)
I was following the instructions from this document and thought I made it pretty far, but I get an error and wondered if you know what is going on.
When I enter the command, it starts to compile. After about 30 minutes, I get to the error you see below.
./make-toolchain.sh
Here is the error:
test -d po || mkdir po
checking whether getopt is declared... /cygdrive/c/downloads/mono/Mono-2.4/bin/m
sgfmt --statistics -o po/be.gmo /cygdrive/c/projects/tools/home/iphone-2.0-toolc
hain/src/gcc/libcpp/po/be.po
c:\downloads\mono\Mono-2.4\bin\msgfmt.exe: error while opening "/cygdrive/c/proj
ects/tools/home/iphone-2.0-toolchain/src/gcc/libcpp/po/be.po" for reading: No su
ch file or directory
make[2]: *** [po/be.gmo] Error 1
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone/libcpp'
make[1]: *** [all-libcpp] Error 2
make[1]: *** Waiting for unfinished jobs....
no
checking whether clock is declared... yes
checking whether getpagesize is declared... yes
checking whether clearerr_unlocked is declared... no
checking whether feof_unlocked is declared... no
checking whether ferror_unlocked is declared... no
checking whether fflush_unlocked is declared... no
checking whether fgetc_unlocked is declared... no
checking whether fgets_unlocked is declared... no
checking whether fileno_unlocked is declared... no
checking whether fprintf_unlocked is declared... no
checking whether fputc_unlocked is declared... no
checking whether fputs_unlocked is declared... no
checking whether fread_unlocked is declared... no
checking whether fwrite_unlocked is declared... no
checking whether getchar_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking whether getrlimit is declared... yes
checking whether setrlimit is declared... yes
checking whether getrusage is declared... yes
checking whether ldgetname is declared... no
checking whether times is declared... yes
checking whether sigaltstack is declared... no
checking for struct tms... yes
checking for clock_t... yes
checking for .preinit_array/.init_array/.fini_array support... no
checking if mkdir takes one argument... no
For real value is
For real value is
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/arm.c' for machine-specific logic.
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/'
for machine-specific C++ logic.
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/a
rm/arm.md' as machine description file.
Using the following target machine macro files:
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/arm.h
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/darwin.h
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/darwin9.h
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/darwin.h
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/arm/darwin.h
Using `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/config/i386/xm-cygwin.h' as host machine macro file.
Using host-cygwin.o for host machine hooks.
checking whether NLS is requested... yes
checking for catalogs to be installed... be ca da de el es fr ja nl ru rw sr sv
tr zh_CN zh_TW
checking for library containing RegOpenKeyExA... no
checking what assembler to use... /usr/local/bin/arm-apple-darwin9-as
checking what linker to use... /usr/local/bin/arm-apple-darwin9-ld
checking for arm-apple-darwin9-nm... /usr/local/bin/arm-apple-darwin9-nm
checking what nm to use... /usr/local/bin/arm-apple-darwin9-nm
checking for arm-apple-darwin9-objdump... no
checking what objdump to use... not found
checking assembler for .balign and .p2align... no
checking assembler for .p2align with maximum skip... yes
checking assembler for .literal16... yes
checking assembler for working .subsection -1... no
checking assembler for .weak... no
checking assembler for .weakref... no
checking assembler for .nsubspa comdat... no
checking assembler for .hidden... no
checking linker for .hidden support... no
checking assembler for .sleb128 and .uleb128... no
checking assembler for eh_frame optimization... no
checking assembler for section merging support... no
checking assembler for section merging support... (cached) no
checking assembler for COMDAT group support... no
checking assembler for COMDAT group support... no
checking assembler for thread-local storage support... no
checking linker -Bstatic/-Bdynamic option... no
checking assembler for dwarf2 debug_line support... no
checking assembler for buggy dwarf2 .file directive... no
checking assembler for --gdwarf2 option... no
checking assembler for --gstabs option... yes
checking linker read-only and read-write section mixing... unknown
checking linker PT_GNU_EH_FRAME support... no
checking linker position independent executable support... no
checking linker --as-needed support... no
checking linker --sysroot support... no
checking __stack_chk_fail in target C library... checking for __stack_chk_fail..
. no
no __stack_chk_fail on this target
no
Using ggc-page for garbage collection.
checking whether to enable maintainer-specific portions of Makefiles... no
Links are now set up to build a cross-compiler
from i686-pc-cygwin to arm-apple-darwin9.
updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gccbug
config.status: creating mklibgcc
config.status: creating libada-mk
config.status: creating ada/Makefile
config.status: creating auto-host.h
config.status: executing default commands
make[1]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone'
make: *** [all] Error 2
This script requires that you enter the proper administrator password
in order to install gcc-4.2-iphone in /usr/local
make[1]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchai
n/build/gcc-4.2-iphone'
/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/mkinstalldirs /usr/local /usr/local
make[2]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/build/gcc-4.2-iphone/fixincludes'
rm -rf /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools
/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/fixincludes
/../mkinstalldirs /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools
mkdir -p -- /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools
/bin/sh /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/fixincludes
/../mkinstalldirs /usr/local/lib/gcc/arm-apple-darwin9/4.2.1/install-tools/include
/usr/bin/install -c -m 644 /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/
src/gcc/fixincludes/README-fixinc \
/usr/local/lib/gcc/arm-apple-darwin9/4.2.1/install-tools/include/READM
E
/usr/bin/install -c fixinc.sh /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/ins
tall-tools/fixinc.sh
/usr/bin/install -c fixincl.exe \
/usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/install-tools/fixincl.e
xe
/usr/bin/install -c mkheaders /usr/local/libexec/gcc/arm-apple-darwin9/4.2.1/ins
tall-tools/mkheaders
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone/fixincludes'
make[2]: Entering directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/build/gcc-4.2-iphone/gcc'
test -d po || mkdir po
/cygdrive/c/downloads/mono/Mono-2.4/bin/msgfmt --statistics -o po/be.gmo /cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/po/be.po
c:\downloads\mono\Mono-2.4\bin\msgfmt.exe: error while opening "/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/gcc/po/be.po" for reading: No such
file or directory
make[2]: *** [po/be.gmo] Error 1
make[2]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/cygdrive/c/projects/tools/home/iphone-2.0-toolchain
/build/gcc-4.2-iphone'
make: *** [install] Error 2
I also find it strange that msgfmt would be executed, from Mono? Why is mono or .net used for this build?
I have a win32/windowsxp system, intel dual core.
"g++ (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
From the looks of what code you have above, you are using cygwin to compile some tools for Windows.
Your compile stopped cold because it can't find:
/cygdrive/c/projects/tools/home/iphone-2.0-toolchain/src/gcc/libcpp/po/be.p
Which looks like it is looking for some part of libcpp and cant find it. You can probably solve this by re-running the Cygwin installer and choosing libcpp when you do.
On a side note, I would advise not doing trying to run iPhone dev tools on Windows. It's nowhere near the same experience you will get on Mac OS X and you will run into many many frustrations as above.
These hacks are generally only for hardcore coders with the chops to use a hacked IDE on a non-standard environment. If you cannot understand the warning message above (which is fairly simple for anyone who has used gcc), don't feel bad but you probably don't have the skill to accomplish what you are attempting.
My advice: Buy yourself a Mac mini if you don't want to spend much money, the tools come with the Mac and you will be able to have fun writing iPhone apps without the frustration of wondering when your development environment will next break. In addition, when something isn't working right you won't have to worry whether it is your hacked dev environment or a problem with your code.
You also won't be able to submit your app to the iPhone AppStore, and Apple really frown on doing this so you won't get any help from Apple and probably any other iPhone dev's if they find out your doing this.
Good luck!