lambdanative icon indicating copy to clipboard operation
lambdanative copied to clipboard

cross compile for avr atmega (arduino)

Open gassechen opened this issue 3 years ago • 3 comments

Hello i'm try cross compile for avr ... => configuring source in /root/.lambdanative/tmp_install/gambc-v4_7_9 ... CHOST=avr PKG_CONFIG_PATH=/root/.cache/lambdanative/avr/lib/pkgconfig PATH="/root/.cache/lambdanative/avr/bin:/opt/arduino/hardware/tools/avr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/share/ant/bin:/usr/lib64/kf5:/usr/lib64/kde4/libexec:/usr/mingw-w64-v8.0.0_gcc10.2.0/bin:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/java/jre/bin:/usr/lib64/qt5/bin" LDFLAGS=-L/root/.cache/lambdanative/avr/lib LD_LIBRARY_PATH=/root/.cache/lambdanative/avr/lib CPPFLAGS=-I/root/.cache/lambdanative/avr/include CC="/opt/arduino/hardware/tools/avr/bin/avr-gcc -g -O0 -fcommon --host=avr -I/root/.cache/lambdanative/avr/include -L/root/.cache/lambdanative/avr/lib" CXX="/opt/arduino/hardware/tools/avr/bin/avr-g++ -g -O0 -fcommon --host=avr -I/root/.cache/lambdanative/avr/include -L/root/.cache/lambdanative/avr/lib" AR="/opt/arduino/hardware/tools/avr/bin/avr-ar" RANLIB="/opt/arduino/hardware/tools/avr/bin/avr-ranlib" NM="/opt/arduino/hardware/tools/avr/bin/avr-nm" LD="/opt/arduino/hardware/tools/avr/bin/avr-ld" AS="/opt/arduino/hardware/tools/avr/bin/avr-as" CPP="/opt/arduino/hardware/tools/avr/bin/avr-cpp" OBJCOPY="/opt/arduino/hardware/tools/avr/bin/avr-objcopy" STRIP="/opt/arduino/hardware/tools/avr/bin/avr-strip" GPROF="/opt/arduino/hardware/tools/avr/bin/avr-gprof" READELF="/opt/arduino/hardware/tools/avr/bin/avr-readelf" OBJDUMP="/opt/arduino/hardware/tools/avr/bin/avr-objdump" ./configure --prefix=/root/.cache/lambdanative/avr
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for gcc... /opt/arduino/hardware/tools/avr/bin/avr-gcc -g -O0 -fcommon --host=avr -I/root/.cache/lambdanative/avr/include -L/root/.cache/lambdanative/avr/lib checking whether the C compiler works... no configure: error: in /root/.lambdanative/tmp_install/gambc-v4_7_9': configure: error: C compiler cannot create executables See config.log' for more details ERROR: failed with exit code 77

configure failed BUILD FAILED

how chage this check? checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu

gassechen avatar Feb 17 '21 02:02 gassechen

Well, Atmen AVR is not a target we support out of the box, so you might need to provide more details on the new target you made to help figure this out? Also, the host type for libgambc might need to be set in libraries/libgambc/make.sh just like we do for win32 for example: libraries/libgambc/make.sh#L22

mgorges avatar Feb 17 '21 03:02 mgorges

Do you think it is interesting to compile for the avr platform?

gassechen avatar Feb 17 '21 03:02 gassechen

If I look at https://github.com/gambit/gambit/issues/485 this still seems to be work in progress to even get Gambit to cross-compile let alone any other library? As for interest, personally: no - we use Raspberry Pi or BeagleBone black for small embedded systems, but that doesn't mean others might not find this interesting. However, I don't have a device to test with and as long as Gambit won't compile I don't think we can quickly add this as a supported platform?

mgorges avatar Feb 17 '21 03:02 mgorges