Trouble compiling CHDK on Linux - missing libc.a - General Discussion and Assistance - CHDK Forum

Trouble compiling CHDK on Linux - missing libc.a

  • 4 Replies
  • 3622 Views
Trouble compiling CHDK on Linux - missing libc.a
« on: 14 / January / 2021, 08:45:29 »
Advertisements
Hi,

I've been having trouble compiling CHDK development trunk (unmodified) on Linux. I have tried many things including older versions of GCC and arm-none-eabi-gcc (4.9, 5.3 and 5.5), and different cameras (each time with make clean), without any success.

This is the error from compiling with GCC 10.2.0 and arm-none-eabi-gcc 10.2.0

Code: [Select]

>> Entering to modules/../lib/lua
nothumb.c -> .o3/nothumb.o
-> ../lib/libc/.o3/libc.a
gui_fselect.c -> .o3/gui_fselect.o
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/lua'
arm-none-eabi-ar: ../lib/libc/.o3/libc.a: No such file or directory
make[1]: *** [../build_rules.inc:50: ../lib/libc/.o3/libc.a] Error 1
make[1]: *** Waiting for unfinished jobs....

Any ideas what could I could try next?

The full output as well below:

Code: [Select]
[josh@laptop2:~/CHDK/source/chdk_latest_2]$ make PLATFORM=g7x2 PLATFORMSUB=101b fir
arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
**** Build: 1.6.0
>> Entering to tools
make[1]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/tools'
makeexport.c -> makeexport.o
pakwif.c -> pakwif.o
gensig_vxworks.c -> gensig_vxworks.o
>> Entering to tools/packfi2
stubs_load.c -> stubs_load.o
firmware_load.c -> firmware_load.o
ptp_op_names.c -> ptp_op_names.o
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/tools/packfi2'
gensig_dryos.c -> gensig_dryos.o
fi2enc.c -> fi2enc.o
dancingbits.c -> dancingbits.o
font_8x16_pack.c -> font_8x16_pack.o
makelang.c -> makelang.o
code_gen.c -> code_gen.o
chdk_dasm.c -> chdk_dasm.o
aes128.c -> aes128.o
compress.c -> compress.o
gen_conf_lua.c -> gen_conf_lua.o
deflate.c -> deflate.o
crc32.c -> crc32.o
makeexport.o -> makeexport
zutil.c -> zutil.o
adler32.c -> adler32.o
pakwif.o -> pakwif
trees.c -> trees.o
gensig_vxworks.o -> gensig_vxworks
gensig_dryos.o -> gensig_dryos
dancingbits.o -> dancingbits
font_8x16_pack.o -> font_8x16_pack
makelang.o -> makelang
gen_conf_lua.o -> gen_conf_lua
-> signatures_vxworks.h
CAUTION! 'signatures_vxworks.h' is not updated due to 'sig_ref_vxworks_1.bin` or 'sig_ref_vxworks_2.bin` or 'sig_ref_vxworks_3.bin` is empty!
-> signatures_dryos.h
CAUTION! 'signatures_dryos.h' is not updated due to 'sig_ref_dryos_?.bin` is empty!
finsig_vxworks.c -> finsig_vxworks.o
finsig_dryos.c -> finsig_dryos.o
code_gen.o stubs_load.o firmware_load.o chdk_dasm.o -> code_gen
fi2enc.o -> fi2enc
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/tools/packfi2'
<< Leaving tools/packfi2
>> Entering to tools/elf2flt
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/tools/elf2flt'
myio.c -> myio.o
elf-arm.c -> elf-arm.o
elfflt.c -> elfflt.o
main.c -> main.o
fltdump.c -> fltdump.o
fltdump.o -> fltdump
myio.o -> elf2flt
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/tools/elf2flt'
<< Leaving tools/elf2flt
finsig_vxworks.o stubs_load.o firmware_load.o ptp_op_names.o -> finsig_vxworks
finsig_dryos.o stubs_load.o firmware_load.o ptp_op_names.o -> finsig_dryos
make[1]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/tools'
<< Leaving tools
>> Entering to modules
make[1]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/modules'
../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
>> Entering to modules/../lib/lua
nothumb.c -> .o3/nothumb.o
-> ../lib/libc/.o3/libc.a
gui_fselect.c -> .o3/gui_fselect.o
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/lua'
arm-none-eabi-ar: ../lib/libc/.o3/libc.a: No such file or directory
make[1]: *** [../build_rules.inc:50: ../lib/libc/.o3/libc.a] Error 1
make[1]: *** Waiting for unfinished jobs....
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
setjmp.S -> .o3/setjmp.o
lapi.c -> .o3/lapi.o
lcode.c -> .o3/lcode.o
ldebug.c -> .o3/ldebug.o
ldo.c -> .o3/ldo.o
ldump.c -> .o3/ldump.o
lfunc.c -> .o3/lfunc.o
lgc.c -> .o3/lgc.o
llex.c -> .o3/llex.o
lmem.c -> .o3/lmem.o
lobject.c -> .o3/lobject.o
lopcodes.c -> .o3/lopcodes.o
lparser.c -> .o3/lparser.o
lstate.c -> .o3/lstate.o
lstring.c -> .o3/lstring.o
ltable.c -> .o3/ltable.o
ltm.c -> .o3/ltm.o
lundump.c -> .o3/lundump.o
lvm.c -> .o3/lvm.o
lzio.c -> .o3/lzio.o
lauxlib.c -> .o3/lauxlib.o
lbaselib.c -> .o3/lbaselib.o
ldblib.c -> .o3/ldblib.o
ltablib.c -> .o3/ltablib.o
lmathlib.c -> .o3/lmathlib.o
limathlib.c -> .o3/limathlib.o
liolib.c -> .o3/liolib.o
loslib.c -> .o3/loslib.o
lstrlib.c -> .o3/lstrlib.o
loadlib.c -> .o3/loadlib.o
linit.c -> .o3/linit.o
.o3/setjmp.o .o3/lapi.o .o3/lcode.o .o3/ldebug.o .o3/ldo.o .o3/ldump.o .o3/lfunc.o .o3/lgc.o .o3/llex.o .o3/lmem.o .o3/lobject.o .o3/lopcodes.
o .o3/lparser.o .o3/lstate.o .o3/lstring.o .o3/ltable.o .o3/ltm.o .o3/lundump.o .o3/lvm.o .o3/lzio.o .o3/lauxlib.o .o3/lbaselib.o .o3/ldblib.o
 .o3/ltablib.o .o3/lmathlib.o .o3/limathlib.o .o3/liolib.o .o3/loslib.o .o3/lstrlib.o .o3/loadlib.o .o3/linit.o -> .o3/liblua.a
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/lib/lua'
<< Leaving modules/../lib/lua
>> Entering to modules/../lib/ubasic
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/ubasic'
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
tokenizer.c -> .o3/tokenizer.o
ubasic.c -> .o3/ubasic.o
.o3/tokenizer.o .o3/ubasic.o -> .o3/libubasic.a
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/lib/ubasic'
<< Leaving modules/../lib/ubasic
>> Entering to modules/../lib/armutil
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/armutil'
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
callfunc.S -> .o3/callfunc.o
reboot.c -> .o3/reboot.o
cache.c -> .o3/cache.o
.o3/callfunc.o .o3/reboot.o .o3/cache.o -> .o3/libarmutil.a
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/lib/armutil'
<< Leaving modules/../lib/armutil
>> Entering to modules/../lib/lang
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/lang'
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
../../tools/makelang -> lang_str.h
fileutil.c -> .o3/fileutil.o
lang.c -> .o3/lang.o
.o3/lang.o .o3/fileutil.o -> .o3/liblang.a
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/lib/lang'
<< Leaving modules/../lib/lang
>> Entering to modules/../lib/font
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/font'
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.
rbf_font.c -> .o3/rbf_font.o
font_8x16.c -> .o3/font_8x16.o
.o3/font_8x16.o .o3/rbf_font.o -> .o3/libfont.a
make[2]: Leaving directory '/home/josh/CHDK/source/chdk_latest_2/lib/font'
<< Leaving modules/../lib/font
>> Entering to modules/../lib/core
make[2]: Entering directory '/home/josh/CHDK/source/chdk_latest_2/lib/core'
../../arm_rules.inc:24: Unsupported GCC version. CHDK build is supported on GCC 4, 5, 8 or 9. GCC 10 support is experimental.

--cut to fit into 7500 character post limit


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Trouble compiling CHDK on Linux - missing libc.a
« Reply #1 on: 14 / January / 2021, 15:45:45 »
To me it looks like you are trying to run a parallel make build (-jN where N > 1). This won't work for CHDK.
Do you have the -j option set in MAKEFLAGS in your shell init script?


Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Trouble compiling CHDK on Linux - missing libc.a
« Reply #2 on: 14 / January / 2021, 17:06:35 »
Yep that's it thanks! Works now that I unset the -jN option.

I added this to my .bashrc a long time ago thinking it would save me lots of time and effort but looks like it did not.

Code: [Select]
#enable multi CPU compiling for make automatically
export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Trouble compiling CHDK on Linux - missing libc.a
« Reply #3 on: 14 / January / 2021, 17:18:32 »
Yep that's it thanks! Works now that I unset the -jN option.

I added this to my .bashrc a long time ago thinking it would save me lots of time and effort but looks like it did not.

Code: [Select]
#enable multi CPU compiling for make automatically
export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"



In a lot of cases that would save time if you have many CPUs / cores. Unfortunately our build system is not set up to handle it and stuff gets built out of order.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Trouble compiling CHDK on Linux - missing libc.a
« Reply #4 on: 14 / January / 2021, 21:13:18 »
Yep that's it thanks! Works now that I unset the -jN option.

I added this to my .bashrc a long time ago thinking it would save me lots of time and effort but looks like it did not.

Code: [Select]
#enable multi CPU compiling for make automatically
export MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"



In a lot of cases that would save time if you have many CPUs / cores. Unfortunately our build system is not set up to handle it and stuff gets built out of order.


Yep I added it in to save time setting this option before compiling software (such as from AUR) since my laptop has 4 cores, but didn't realize it would cause problems with some build systems. It has probably also been the cause for other software on my system to not compile in the past which I never found the reason for until now.


Thanks

 

Related Topics


SimplePortal © 2008-2014, SimplePortal