10456 questions

12460 answers

19384 comments

21896 members

0 votes
62 views 3 comments
by
Hi, I am trying to compile version 2.06.01 of the RUT OS firmware for the TRB142, but it keeps failing, I have tried Ubuntu version 20.04, 18.04 and 16.04 and none of them have worked. I have also tried following the new SDK guide and the Legacy SDK guide and neither have worked. Any help would be much appreciated.

Charlie

Here is the output from the build process on Ubuntu 18.04:

make -j2 V=s
WARNING: Makefile 'package/configdb/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/diag/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/dsutils/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/mcm-core/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/services/net-snmp/Makefile' has a dependency on 'libpci', which does not exist
WARNING: Makefile 'package/qmi-client-helper/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/utils/qmicli/Makefile' has a dependency on 'libmbim', which does not exist
WARNING: Makefile 'package/qmuxd/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/xmllib/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!
make[1]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make compile-install
make[2]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[3]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[3]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
+ mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi
+ cd /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi
+ mkdir -p bin lib include stamp
mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp
touch /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/.prepared
+ mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host
+ cd /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host
+ mkdir -p bin lib include stamp
mkdir -p /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/stamp /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/sys
install -m0644 /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/include/*.h /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/
install -m0644 /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/include/sys/*.h /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/include/sys/
ln -sf lib /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/lib64
touch /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/host/.prepared
make[4]: Entering directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/flock'
touch: cannot touch '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check': Permission denied
touch: cannot touch '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check': Permission denied
Makefile:25: recipe for target '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check' failed
make[4]: *** [/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/flock/.prepared8a39d031cbb2a2262d4c98af1e505866_6664517399ebbbc92a37c5bb081b5c53_check] Error 1
make[4]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/tools/flock'
time: tools/flock/compile#0.04#0.02#0.15
tools/Makefile:158: recipe for target 'tools/flock/compile' failed
make[3]: *** [tools/flock/compile] Error 2
make[3]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
tools/Makefile:156: recipe for target '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy' failed
make[2]: *** [/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[2]: *** Waiting for unfinished jobs....
rm -rf /home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-mdm9x07
make[3]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
make[2]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
Makefile:102: recipe for target 'world' failed
make[1]: *** [world] Error 2
make[1]: Leaving directory '/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64'
Build failed - please re-run with -j1 to see the real error message
/home/charlie/openwrt-gpl-mdm9x07.Linux-x86_64/include/toplevel.mk:229: recipe for target 'world' failed
make: *** [world] Error 1

2 Answers

0 votes
by
The question was answered by flebourse over direct message, and allowed me to fix the issue.
To make it work  I ran it on Ubuntu 18.04 and added the following patches:

m4:
create a tools/m4/patches/020-c-stack-c.patch file containing:
--- a/lib/c-stack.c     2016-12-31 14:54:41.000000000 +0100                                                                        
+++ b/lib/c-stack.c     2022-05-24 10:10:35.798990309 +0200                                                                        
@@ -52,12 +52,6 @@                                                                                                                 
 #endif                                                                                                                            
 #ifndef SIGSTKSZ                                                                                                                  
 # define SIGSTKSZ 16384                                                                                                           
-#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384                                                                                         
-/* libsigsegv 2.6 through 2.8 have a bug where some architectures use                                                             
-   more than the Linux default of an 8k alternate stack when deciding                                                             
-   if a fault was caused by stack overflow.  */                                                                                   
-# undef SIGSTKSZ                                                                                                                  
-# define SIGSTKSZ 16384                                                                                                           
 #endif                                                                                                                            
                                                                                                                                   
 #include                                                                                                                


mklib:
apply the following patch to tools/mklib/Makefile:
--- Makefile.~1~        2020-05-04 07:06:14.000000000 +0200
+++ Makefile    2022-05-24 11:30:27.783500110 +0200
@@ -18,6 +18,9 @@
 include $(INCLUDE_DIR)/host-build.mk

 HOST_CFLAGS += -I$(CURDIR)/include
+HOST_CPPFLAGS += -std=gnu++98
+HOST_CXXFLAGS += -std=gnu++98 -I$(CURDIR)/include
+CXXFLAGS += -std=gnu++98

 define Host/Install
    $(INSTALL_BIN) \
Best answer
0 votes
by

Hello,

It seems that you have permission issues during the build, check that you are the owner of all files / subdirs.

It is probably simpler and cleaner to restart everything, and use tar xovfz the_sdk_file to extract the SDK.

Regards,

by
Hi, thanks for your help. I just tried what you suggested and it still failed. Do you have any other suggestions?

Here is the output (I had to cut it down as the output was too long for the website)

This is the first bit with some errors
make -j2 V=s

WARNING: Makefile 'package/configdb/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/diag/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/dsutils/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/mcm-core/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/services/net-snmp/Makefile' has a dependency on 'libpci', which does not exist
WARNING: Makefile 'package/qmi-client-helper/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/network/utils/qmicli/Makefile' has a dependency on 'libmbim', which does not exist
WARNING: Makefile 'package/qmuxd/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/xmllib/Makefile' has a build dependency on 'common', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist
WARNING: Makefile 'package/feeds/packages/xz/Makefile' has a dependency on 'bash', which does not exist

It ran fine for a while and then started getting these errors:

make[4]: Entering directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/tools/mpfr'
libCMakeLib.a(cmState.cxx.o): In function `ContainerAlgorithms::DefaultDeleter<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cmCommand*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> > >, true> std::for_each<std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> >, ContainerAlgorithms::DefaultDeleter<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cmCommand*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> > >, true> >(std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> >, std::_Rb_tree_const_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> >, ContainerAlgorithms::DefaultDeleter<std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, cmCommand*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, cmCommand*> > >, true>) [clone .isra.158]':
cmState.cxx:(.text+0x4c9): undefined reference to `vtable for cmDisallowedCommand'
libCMakeLib.a(cmState.cxx.o): In function `cmState::AddDisallowedCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cmCommand*, cmPolicies::PolicyID, char const*)':
cmState.cxx:(.text+0x29a4): undefined reference to `vtable for cmDisallowedCommand'
libCMakeLib.a(cmState.cxx.o): In function `cmState::RemoveBuiltinCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
cmState.cxx:(.text+0x2d9a): undefined reference to `vtable for cmDisallowedCommand'
libCMakeLib.a(cmState.cxx.o): In function `cmState::AddScriptedCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cmCommand*)':
cmState.cxx:(.text+0x3042): undefined reference to `vtable for cmDisallowedCommand'
cmState.cxx:(.text+0x33cb): undefined reference to `vtable for cmDisallowedCommand'
libCMakeLib.a(cmState.cxx.o):cmState.cxx:(.text._ZN19cmDisallowedCommandD2Ev[_ZN19cmDisallowedCommandD5Ev]+0x7): more undefined references to `vtable for cmDisallowedCommand' follow
collect2: error: ld returned 1 exit status
Source/CMakeFiles/ccmake.dir/build.make:279: recipe for target 'bin/ccmake' failed
make[7]: *** [bin/ccmake] Error 1
make[7]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/cmake-3.15.1'
CMakeFiles/Makefile2:1969: recipe for target 'Source/CMakeFiles/ccmake.dir/all' failed
make[6]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2
make[6]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/cmake-3.15.1'
Makefile:162: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/cmake-3.15.1'
Makefile:50: recipe for target '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/cmake-3.15.1/.built' failed
make[4]: *** [/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/build_dir/host/cmake-3.15.1/.built] Error 2
make[4]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/tools/cmake'
time: tools/cmake/compile#3.49#1.79#8.21
tools/Makefile:158: recipe for target 'tools/cmake/compile' failed
make[3]: *** [tools/cmake/compile] Error 2
make[3]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/tools/mpfr'
time: tools/mpfr/compile#0.13#0.20#0.44
make[3]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64'
tools/Makefile:156: recipe for target '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy' failed
make[2]: *** [/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyyynyynynnyyynnyyy] Error 2
make[2]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64'
Makefile:102: recipe for target 'world' failed
make[1]: *** [world] Error 2
make[1]: Leaving directory '/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64'
Build failed - please re-run with -j1 to see the real error message
/home/charlie/TRB_SDK/openwrt-gpl-mdm9x07.Linux-x86_64/include/toplevel.mk:229: recipe for target 'world' failed
make: *** [world] Error 1
by
Could you restart from scratch and do a 'make -j 1 V=sc 2>&1 | tee makelog.txt' and post the makelog file somewhere ?
by
Hi,

I have started from scratch on Ubuntu 18.04 again and used the command you suggested to create a makelog.txt file. I have sent a private message with a link to the file.

Thank you for your help,

Charlie