Errors building source for cross development
-
I am building the source for cross development to Omega2/2+ from Ubuntu 20.4.
I am following this guide:
https://github.com/OnionIoT/source
but a number of errors occurs.
I have used this process before on Ubuntu 16 and it worked ok.I have solved the error with the mismatched type for __u64
I still get the following error:
configure: error: could not determine how to read list of mounted file systems
make[3]: *** [Makefile:22: /home/lachlan/omega/source/build_dir/host/findutils-4.6.0/.configured] Error 1
make[3]: Leaving directory '/home/lachlan/omega/source/tools/findutils'
Command exited with non-zero status 2
time: tools/findutils/compile#12.71#4.27#16.31
make[2]: *** [tools/Makefile:154: tools/findutils/compile] Error 2
make[2]: Leaving directory '/home/lachlan/omega/source'
make[1]: *** [tools/Makefile:150: /home/lachlan/omega/source/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
make[1]: Leaving directory '/home/lachlan/omega/source'
make: *** [/home/lachlan/omega/source/include/toplevel.mk:218: world] Error 2Does anyone know how I can fix this problem:
I cannot find where in the make system this error comes from, so I cant determent the source of the problem.Any ideas would be well received
-
@Lachlan-Peter try this:
make clean
./scripts/feeds update
./scripts/onion-minimal-build.sh
make -j8
-
Still has the same error using onion-minimal-build
Any other ideas?
Thanks
-
I need to see the build log, run with make -j1 V=s then post the log.
-
Have attached the output of the make command.
The system wont let me attach a txt file so I have renamed the log.txt file to log.bin.
You will need to change the .bin back to .txt to read the log.The last part of the log file where the error is in my original post.
I presume the screen output is what you mean by the build log file as I cannot find any other log file in the make directory or its subdirectories
-
@Lachlan-Peter run make menuconfig, look in "Utilities" submenu and disable "findutils-find" then make clean and make -j 8
That should fix the issue.
-
In menuconfig, all findutils are not enabled (findutils-find, findutils-locate, findutils-args).
This is not where the problem lies.The problem is the Makefile in 'tools' that makes 'findutils'. You can see in my original post that it is the tools/Makefile where the error occurs.
Unfortunately I cannot remove 'findutils' from the Makefile as it is a requirement for building 'quilt'. If I remove the entry for 'findutils' in 'tools/Makefil' at line 28, I get the follwing error:
time: tools/patch-image/compile#0.04#0.01#0.09
make[2]: *** No rule to make target 'tools/findutils/compile', needed by 'tools/quilt/compile'. Stop.
make[2]: Leaving directory '/home/lachlan/omega/source'
make[1]: *** [tools/Makefile:150: /home/lachlan/omega/source/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyy] Error 2There is nothing in the tools/findutils/Makefile that helps me determine the problem.
Any further ideas?
-
Note: There is a different folder and different makefile for 'findutils' in 'tools' and 'package/feeds/packages/findutils'. It is the 'tools' version that is giving the problem. menuconfig probably disables the package created in Utilities.
-
@Lachlan-Peter
Immediately before the 'findutils failure', there is more error information:checking for BEOS mounted file system support functions... no
checking whether it is possible to resort to fread on /etc/mnttab... no
configure: error: could not determine how to read list of mounted file systems
make[3]: *** [Makefile:22: /home/lachlan/omega/source/build_dir/host/findutils-4.6.0/.configured] Error 1
make[3]: Leaving directory '/home/lachlan/omega/source/tools/findutils'
Command exited with non-zero status 2
time: tools/findutils/compile#23.95#6.64#54.33
make[2]: *** [tools/Makefile:154: tools/findutils/compile] Error 2
make[2]: Leaving directory '/home/lachlan/omega/source'
make[1]: *** [tools/Makefile:150: /home/lachlan/omega/source/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyy] Error 2
make[1]: Leaving directory '/home/lachlan/omega/source'
make: *** [/home/lachlan/omega/source/include/toplevel.mk:218: world] Error 2It seems from what I can find on the web, the problem with 'findutils' is because there is no way to determine the mounted file systems.
There are references on the web that say this can be worked around by disabling the error. An example is:
https://github.com/StephanTLavavej/mingw-distro/blob/master/coreutils.patchHowever, I can't find the reference to "could not determine how to read mounted file systems" in any Makefile or configure file. Therefore it is difficult to determine a work around.
Any ideas ?
-
@Lachlan-Peter post the contents your .config file so I can test it. I build on Ubuntu 20 myself so I should be able to duplicate your issue.
-
The config file is attached. I had to rename it from .config to config.bin so I could upload it. You will need to rename it correctly before using it.
Thanks
-
@Lachlan-Peter You config indicates you are building for the wrong device. ar71xx instead of ramips_mt76x8. Run make menuconfig, at the top choose the target device as Mediateck ralink MIPS, in Sub target menu choose MT76x8 based boards, Target profile set to Multiple Devices, in Target Devices choose Omega2+
Then run make clean and make -j 8
If you still have the issue can you run ls -la .config and post the output
-
I don't know why the problem occurred with the config file. I was using the work computer for the last attempt when I downloaded the .config file.
I am back on my main machine where I have checked each time that I am using Media Ralink MIPS/MT76x8 based coards/Multiple Devices/Onion Omega 2 & Onion Omega 2.
However, things have deteriorated on my main machine. I cant even get as far as I did previously. Here are the exact steps I have done using a clean install
$ git clone https://github.com/OnionIoT/source.git
$ cd source
$ sh scripts/onion-feed-setup.sh
$ sh scripts/onion-minimal-build.sh
( Also tried adding $ python scripts/onion-setup-build.py but same result)Edit: /usr/include/asm-generic/int-ll64.h line 31
from: extension typedef unsigned long long __64;
to: typedef uint64_t __64;
This prevents errors with __u64 different typedef's$ make menuconfig
Target System : MediaTek Ralink MIPS default
Subtarget : MT76x8 based boards default
Target Profile: Multiple Devices default
Target Devices: Onion Omega2, Onion Omega2+ defaultAdded: Development: gdb Libraries: libgpiod Save and exit
$ make -j1 V=s
Error is:
checking whether sleep is declared... no
checking for socklen_t... no
checking for socklen_t equivalent... configure: error: Cannot find a type to use in place of socklen_t
make[3]: *** [Makefile:46: /home/lachlan/omega/source/build_dir/host/sed-4.5/.configured] Error 1
make[3]: Leaving directory '/home/lachlan/omega/source/tools/sed'
Command exited with non-zero status 2
time: tools/sed/compile#10.72#3.68#13.83
make[2]: *** [tools/Makefile:154: tools/sed/compile] Error 2
make[2]: Leaving directory '/home/lachlan/omega/source'
make[1]: *** [tools/Makefile:150: /home/lachlan/omega/source/staging_dir/target-mipsel_24kc_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
make[1]: Leaving directory '/home/lachlan/omega/source'
make: *** [/home/lachlan/omega/source/include/toplevel.mk:218: world] Error 2The .config file is attached:
config.binPreviously 'make' went way past this point.
Dont know why the compile is failing even earlier than it did before on a clean 'git'
-
@Lachlan-Peter I built using your new config and it builds fine. I recall that when I upgraded my Ubuntu 18.x to 20 my build system broke and needed to install some additional stuff on my Ubuntu 20 system. I was able to identify the required stuff by working though the buld log. Alas I didn't record the steps because I have so many backups and images I never expect to do it again. If you send the entire build log I can probably work it out again for you.
just run make clean, then make -j1 V=s > build.log, post the file and I will take a look.
-
I didnt see this previously as the errors scrolled off the page, but it seems that the errors are in
$ sh scripts/onion-feed-setup.shI get the following warnings when running scripts/onion-feed-setup.sh:
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not existWARNING: No feed for package 'Onion-Console' found
WARNING: No feed for package 'transmission-daemon' found
WARNING: No feed for source package 'libuuid' foundWARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not existWARNING: bluez-examples not installed
WARNING: bluez-libs not installed
WARNING: bluez-utils not installed
WARNING: pulseaudio-daemon not installed
WARNING: pulseaudio-profiles not installed
WARNING: pulseaudio-tools not installed
Uninstalling package 'avrdude'
Collecting package info: done
WARNING: Makefile 'package/feeds/onion/arduino-dock/Makefile' has a dependency on 'avrdude', which does not exist
WARNING: Makefile 'package/feeds/onion/arduino-dock/Makefile' has a dependency on 'avrdude', which does not existI tried addressing this with the following but it did not work:
$ sudo apt-get install libpam0g-dev libgnutls28-dev libldap2-dev libidn2-0-dev libssh2-1-dev liblzma-dev libnet-snmp-perlIm not sure if I need to provide these packages as architecture specific but I cant find mips versions of them
-
@Lachlan-Peter These warnings are usual. I need to see your complete build log.
make -j1 V=s > build.log
-
build.bin
I have added the build log.
Note that it has started to fail much earlier in the build now (at the build of sed instead of findutils). This happens on two separate machines.
Thanks for any insight.
-
@Lachlan-Peter The log you attached is not that of the verbose make, it looks like a standard make. Are you sure you are using the command I gave you?
make -j1 V=s > build.log
The log file will be large as it contains a lot of detail, so you probably need to zip it, but without it, I can't assist you further.
-
I have attached a zip file (you will need to change the extension from .bin) which contains two files.
the build.log file is the file from :
make -j1 V=s > build.logthe build.terminal.log is a copy of the output on the terminal during the build process.
Thanks
build.bin
-
@Lachlan-Peter Can you post the output of make -v also gcc -v