navit-gps / NavitTom

Tiny System for Tomtom devices to run navit
http://wiki.navit-project.org/index.php/TomTom
Other
17 stars 7 forks source link

Compile issue #7

Open meulemans opened 4 years ago

meulemans commented 4 years ago

Hi,

I've followed the steps from the README. 1) clone the repository 2) Add ROOT with path to files in .sh file 3) source the file 4) Run mak and here is where I get into problems. Make is giving me this: make[1]: Entering directory '/home/xxx/NavitTom/src/linux-s3c24xx' /home/xxx/NavitTom/gcc-3.3.4_glibc-2.3.2/bin/arm-linux-gcc: 1: Syntax error: "(" unexpected /home/xxx/NavitTom/gcc-3.3.4_glibc-2.3.2/bin/arm-linux-gcc: 1: Syntax error: "(" unexpected make[1]: Leaving directory '/home/xxx/NavitTom/src/linux-s3c24xx' make: *** [Makefile:111: kernel/arch/arm/boot/zImage] Error 2 I'm using gcc-3.3.4_glibc-2.3.2. Can someone help me resolve this issue?

jkoan commented 4 years ago

Could you please send a git diff to see what changes you made? Also, on which commit is your repo?

meulemans commented 4 years ago

Hi jkoan

The git diff has this result:

diff --git a/get_cross_env.sh b/get_cross_env.sh
index 73c8f92..2804edb 100644
--- a/get_cross_env.sh
+++ b/get_cross_env.sh
@@ -1,5 +1,6 @@
 # Source this file to use OpenTomSDK

+export ROOT="/home/xxx/NavitTom"
 export SOURCE="$ROOT/src"
 export INITRAMFS_ROOT="$ROOT/initramfs"
 export ARM_ROOT=arm-sysroot

Git status tells me: On branch master Your branch is up to date with 'origin/master'.

jkoan commented 4 years ago

Unfortunately i cant reproduce the issue. Is this the full error output of the make command? Could you upload the log of the kernel build from logs/kernel.log?

meulemans commented 4 years ago

The full kernel.log is

make[1]: Entering directory '/home/xxx/NavitTom/src/linux-s3c24xx'
/home/xxx/NavitTom/gcc-3.3.4_glibc-2.3.2/bin/arm-linux-gcc: 1: Syntax error: "(" unexpected
  CHK     include/linux/version.h
  SYMLINK include/asm -> include/asm-arm
  UPD     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  SHIPPED scripts/kconfig/zconf.tab.h
  HOSTCC  scripts/kconfig/kxgettext.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
scripts/kconfig/conf.c: In function ‘conf_string’:
scripts/kconfig/conf.c:164:20: warning: variable ‘help’ set but not used [-Wunused-but-set-variable]
  164 |  const char *def, *help;
      |                    ^~~~
scripts/kconfig/conf.c: In function ‘conf_sym’:
scripts/kconfig/conf.c:198:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
  198 |  int type;
      |      ^~~~
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:273:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
  273 |  int type;
      |      ^~~~
In file included from scripts/kconfig/zconf.tab.c:2123:
lex.zconf.c:2969:16: warning: ‘input’ defined but not used [-Wunused-function]
In file included from scripts/kconfig/zconf.tab.c:2125:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:298:19: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 128 [-Wformat-overflow=]
  298 |  sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                   ^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:298:2: note: ‘sprintf’ output between 13 and 150 bytes into a destination of size 128
  298 |  sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:298:19: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 128 [-Wformat-overflow=]
  298 |  sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                   ^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:298:2: note: ‘sprintf’ output between 13 and 150 bytes into a destination of size 128
  298 |  sprintf(newname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:453:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 128 [-Wformat-overflow=]
  453 |  sprintf(tmpname, "%s%s", dirname, basename);
      |                   ^~~~~~
scripts/kconfig/confdata.c:453:19: note: assuming directive output of 7 bytes
scripts/kconfig/confdata.c:453:2: note: ‘sprintf’ output 1 or more bytes (assuming 135) into a destination of size 128
  453 |  sprintf(tmpname, "%s%s", dirname, basename);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
#
# using defaults found in .config
#
  SPLIT   include/linux/autoconf.h -> include/config/*
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  SYMLINK include/asm-arm/arch -> include/asm-arm/arch-s3c2410
  HOSTCC  scripts/conmakehash
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
/bin/sh: 1: arm-linux-gcc: Exec format error
make[3]: *** [scripts/Makefile.build:191: scripts/mod/empty.o] Error 2
make[3]: *** Waiting for unfinished jobs....
scripts/conmakehash.c: In function ‘getunicode’:
scripts/conmakehash.c:36:22: warning: pointer targets in initialization of ‘unsigned char *’ from ‘char *’ differ in signedness [-Wpointer-sign]
   36 |   unsigned char *p = *p0;
      |                      ^
scripts/conmakehash.c:44:7: warning: pointer targets in assignment from ‘unsigned char *’ to ‘char *’ differ in signedness [-Wpointer-sign]
   44 |   *p0 = p+6;
      |       ^
scripts/conmakehash.c:45:18: warning: pointer targets in passing argument 1 of ‘strtol’ differ in signedness [-Wpointer-sign]
   45 |   return strtol(p+2,0,16);
      |                 ~^~
      |                  |
      |                  unsigned char *
In file included from scripts/conmakehash.c:18:
/usr/include/stdlib.h:176:48: note: expected ‘const char * restrict’ but argument is of type ‘unsigned char *’
  176 | extern long int strtol (const char *__restrict __nptr,
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
make[2]: *** [scripts/Makefile.build:311: scripts/mod] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:466: scripts] Error 2
make[1]: Leaving directory '/home/xxx/NavitTom/src/linux-s3c24xx'
jkoan commented 4 years ago

Which Basesystem are you running on the host? What cpu architecture?

meulemans commented 4 years ago

It is a WSL (Windows Subsystem for Linux) system x86_64 GNU/Linux, didn't have any problems before.

jkoan commented 4 years ago

32bit binary (which the toolchain uses) seem to not be supported by WSL. Please use Linux, a Linux VM or something like this. Alternatively you can also use the Prebuild image from https://circleci.com/api/v1/project/navit-gps/NavitTom/latest/artifacts/0/target/opentom.tar.gz?branch=master&filter=successful or https://circleci.com/api/v1/project/navit-gps/NavitTom/latest/artifacts/0/target/opentom-extra.tar.gz?branch=master&filter=successful

StarMiner99 commented 4 years ago

I have the same issue on a raspberry pi 3b (with Raspbian) also tried on wsl 2 there it couldnt found arm-linux-gcc

Ps. the prebuilt image links are not working

(edit) In Debian virtual machine it fails extractring golinux