pfalcon / esp-open-sdk

Free and open (as much as possible) integrated SDK for ESP8266/ESP8285 chips
1.97k stars 624 forks source link

cannot compute suffix of object files with alpine #287

Open ashareye opened 7 years ago

ashareye commented 7 years ago

hi

I failed to build esp-open-sdk in alpine docker container

here is build.log

xgcc -B/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-core-pass-2/./gcc/ -B/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/bin/ -B/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/lib/ -isystem /esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/include -isystem /esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/buildtools/xtensa-lx106-elf/sys-include
[ERROR] checking for suffix of object files... configure: error: in /esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-core-pass-2/xtensa-lx106-elf/libgcc': [ERROR] configure: error: cannot compute suffix of object files: cannot compile [ALL ] Seeconfig.log' for more details. [ERROR] make[3]: *** [Makefile:9903: configure-target-libgcc] Error 1 [ALL ] make[3]: Leaving directory '/esp-open-sdk/crosstool-NG/.build/xtensa-lx106-elf/build/build-cc-gcc-core-pass-2' [ERROR]
[ERROR] >> [ERROR] >> Build failed in step 'Installing pass-2 core C gcc compiler'

and here is config.log filtered by 'error'

Configured with: /home/buildozer/aports/main/gcc/src/gcc-6.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 6.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-cloog-backend --enable-languages=c,c++,objc,java,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu gcc: error: unrecognized command line option '-V' gcc: fatal error: no input files gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? gcc: fatal error: no input files conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory conftest.c:59:21: error: expected expression before ')' token conftest.c:58:21: fatal error: libintl.h: No such file or directory conftest.c:25:21: fatal error: libintl.h: No such file or directory conftest.c:58:29: fatal error: ncurses/ncurses.h: No such file or directory conftest.c:25:29: fatal error: ncurses/ncurses.h: No such file or directory conftest.c:58:28: fatal error: ncurses/curses.h: No such file or directory conftest.c:25:28: fatal error: ncurses/curses.h: No such file or directory conftest.c:58:29: fatal error: ncursesw/curses.h: No such file or directory conftest.c:25:29: fatal error: ncursesw/curses.h: No such file or directory collect2: error: ld returned 1 exit status

and here is dockerfile in bitbucket

I tried all the methods that I searched including setting LD_LIBRARY_PATH etc., but they didn't work . please give me some advice, thank you

ashareye commented 7 years ago

According to the build.log, I think it may be caused by lack of mpc/mpfr/gmp's lib and inc file. So I check the build.log, config.log, /esp-open-sdk/crosstool-ng/.config, /esp-open-sdk/Makefile, /crosstool-ng/script/.../100-gcc.sh, I found that 100-gcc.sh requires the value of CT_BUILDTOOLS_PREFIX_DIR but .config does not provide? so I added it in .config and make it again, and didn't work again.

I have no idea about that .config and 100-gcc.sh do not match but why ubuntu 14.04 make ok?