'make' returns errors

  • Anonymous - 2012-10-30

    I have been able to compile the code but in the make file I get "undefined reference to dialog_l0_config" and I'm not strong enough as a debugger to figure out why this is happening. I'm posting the output of ./configure && make below

    root@HAL-Crunchbang:/home/mark/downloads/freediag-1.00c# ./configure && make
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking for ranlib... ranlib
    checking for sin in -lm... yes
    checking for tparm in -lncurses... no
    checking for tgetent in -ltermcap... no
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking for stdint.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking termios.h usability... yes
    checking termios.h presence... yes
    checking for termios.h... yes
    checking for unistd.h... (cached) yes
    checking for size_t... yes
    checking for ssize_t... yes
    checking for uint16_t... yes
    checking for uint32_t... yes
    checking for uint8_t... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for alarm... yes
    checking for gettimeofday... yes
    checking for memset... yes
    checking for select... yes
    checking for strcasecmp... yes
    checking for strerror... yes
    checking for strrchr... yes
    checking for strtol... yes
    checking for pid_t... yes
    configure: scangui will not be built
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating scantool/Makefile
    config.status: creating scangui/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    make  all-recursive
    make[1]: Entering directory `/home/mark/downloads/freediag-1.00c'
    Making all in scantool
    make[2]: Entering directory `/home/mark/downloads/freediag-1.00c/scantool'
    make  all-am
    make[3]: Entering directory `/home/mark/downloads/freediag-1.00c/scantool'
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_config.o -MD -MP -MF .deps/diag_config.Tpo -c -o diag_config.o diag_config.c
    mv -f .deps/diag_config.Tpo .deps/diag_config.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_se.o -MD -MP -MF .deps/diag_l0_se.Tpo -c -o diag_l0_se.o diag_l0_se.c
    mv -f .deps/diag_l0_se.Tpo .deps/diag_l0_se.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_me.o -MD -MP -MF .deps/diag_l0_me.Tpo -c -o diag_l0_me.o diag_l0_me.c
    mv -f .deps/diag_l0_me.Tpo .deps/diag_l0_me.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_vw.o -MD -MP -MF .deps/diag_l0_vw.Tpo -c -o diag_l0_vw.o diag_l0_vw.c
    mv -f .deps/diag_l0_vw.Tpo .deps/diag_l0_vw.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_br.o -MD -MP -MF .deps/diag_l0_br.Tpo -c -o diag_l0_br.o diag_l0_br.c
    mv -f .deps/diag_l0_br.Tpo .deps/diag_l0_br.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_elm.o -MD -MP -MF .deps/diag_l0_elm.Tpo -c -o diag_l0_elm.o diag_l0_elm.c
    mv -f .deps/diag_l0_elm.Tpo .deps/diag_l0_elm.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_sim.o -MD -MP -MF .deps/diag_l0_sim.Tpo -c -o diag_l0_sim.o diag_l0_sim.c
    mv -f .deps/diag_l0_sim.Tpo .deps/diag_l0_sim.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l0_dumb.o -MD -MP -MF .deps/diag_l0_dumb.Tpo -c -o diag_l0_dumb.o diag_l0_dumb.c
    mv -f .deps/diag_l0_dumb.Tpo .deps/diag_l0_dumb.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_tty.o -MD -MP -MF .deps/diag_tty.Tpo -c -o diag_tty.o diag_tty.c
    mv -f .deps/diag_tty.Tpo .deps/diag_tty.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l1.o -MD -MP -MF .deps/diag_l1.Tpo -c -o diag_l1.o diag_l1.c
    mv -f .deps/diag_l1.Tpo .deps/diag_l1.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2.o -MD -MP -MF .deps/diag_l2.Tpo -c -o diag_l2.o diag_l2.c
    mv -f .deps/diag_l2.Tpo .deps/diag_l2.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_can.o -MD -MP -MF .deps/diag_l2_can.Tpo -c -o diag_l2_can.o diag_l2_can.c
    mv -f .deps/diag_l2_can.Tpo .deps/diag_l2_can.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_raw.o -MD -MP -MF .deps/diag_l2_raw.Tpo -c -o diag_l2_raw.o diag_l2_raw.c
    mv -f .deps/diag_l2_raw.Tpo .deps/diag_l2_raw.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_iso9141.o -MD -MP -MF .deps/diag_l2_iso9141.Tpo -c -o diag_l2_iso9141.o diag_l2_iso9141.c
    mv -f .deps/diag_l2_iso9141.Tpo .deps/diag_l2_iso9141.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_iso14230.o -MD -MP -MF .deps/diag_l2_iso14230.Tpo -c -o diag_l2_iso14230.o diag_l2_iso14230.c
    mv -f .deps/diag_l2_iso14230.Tpo .deps/diag_l2_iso14230.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_saej1850.o -MD -MP -MF .deps/diag_l2_saej1850.Tpo -c -o diag_l2_saej1850.o diag_l2_saej1850.c
    mv -f .deps/diag_l2_saej1850.Tpo .deps/diag_l2_saej1850.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_vag.o -MD -MP -MF .deps/diag_l2_vag.Tpo -c -o diag_l2_vag.o diag_l2_vag.c
    mv -f .deps/diag_l2_vag.Tpo .deps/diag_l2_vag.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l2_mb1.o -MD -MP -MF .deps/diag_l2_mb1.Tpo -c -o diag_l2_mb1.o diag_l2_mb1.c
    mv -f .deps/diag_l2_mb1.Tpo .deps/diag_l2_mb1.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l3.o -MD -MP -MF .deps/diag_l3.Tpo -c -o diag_l3.o diag_l3.c
    mv -f .deps/diag_l3.Tpo .deps/diag_l3.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l3_saej1979.o -MD -MP -MF .deps/diag_l3_saej1979.Tpo -c -o diag_l3_saej1979.o diag_l3_saej1979.c
    mv -f .deps/diag_l3_saej1979.Tpo .deps/diag_l3_saej1979.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l3_iso14230.o -MD -MP -MF .deps/diag_l3_iso14230.Tpo -c -o diag_l3_iso14230.o diag_l3_iso14230.c
    mv -f .deps/diag_l3_iso14230.Tpo .deps/diag_l3_iso14230.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_l3_vag.o -MD -MP -MF .deps/diag_l3_vag.Tpo -c -o diag_l3_vag.o diag_l3_vag.c
    mv -f .deps/diag_l3_vag.Tpo .deps/diag_l3_vag.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_os.o -MD -MP -MF .deps/diag_os.Tpo -c -o diag_os.o diag_os.c
    mv -f .deps/diag_os.Tpo .deps/diag_os.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_general.o -MD -MP -MF .deps/diag_general.Tpo -c -o diag_general.o diag_general.c
    mv -f .deps/diag_general.Tpo .deps/diag_general.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT diag_dtc.o -MD -MP -MF .deps/diag_dtc.Tpo -c -o diag_dtc.o diag_dtc.c
    mv -f .deps/diag_dtc.Tpo .deps/diag_dtc.Po
    rm -f libdiag.a
    ar cru libdiag.a diag_config.o diag_l0_se.o diag_l0_me.o diag_l0_vw.o diag_l0_br.o diag_l0_elm.o diag_l0_sim.o diag_l0_dumb.o diag_tty.o diag_l1.o diag_l2.o diag_l2_can.o diag_l2_raw.o diag_l2_iso9141.o diag_l2_iso9141.o diag_l2_iso14230.o diag_l2_saej1850.o diag_l2_vag.o diag_l2_mb1.o diag_l3.o diag_l3_saej1979.o diag_l3_iso14230.o diag_l3_vag.o diag_os.o diag_general.o diag_dtc.o diag_config.o 
    ranlib libdiag.a
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT dyno.o -MD -MP -MF .deps/dyno.Tpo -c -o dyno.o dyno.c
    mv -f .deps/dyno.Tpo .deps/dyno.Po
    rm -f libdyno.a
    ar cru libdyno.a dyno.o 
    ranlib libdyno.a
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool.o -MD -MP -MF .deps/scantool.Tpo -c -o scantool.o scantool.c
    scantool.c: In functionj1979_data_rcv’:
    scantool.c:227: warning: cast from pointer to integer of different size
    scantool.c:302: warning: cast from pointer to integer of different size
    scantool.c:332: warning: cast from pointer to integer of different size
    scantool.c:355: warning: cast from pointer to integer of different size
    scantool.c: In functionl3_do_j1979_rqst’:
    scantool.c:593: warning: cast from pointer to integer of different size
    scantool.c: In functiondo_j1979_ncms’:
    scantool.c:1238: warning: cast to pointer from integer of different size
    mv -f .deps/scantool.Tpo .deps/scantool.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_cli.o -MD -MP -MF .deps/scantool_cli.Tpo -c -o scantool_cli.o scantool_cli.c
    mv -f .deps/scantool_cli.Tpo .deps/scantool_cli.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_debug.o -MD -MP -MF .deps/scantool_debug.Tpo -c -o scantool_debug.o scantool_debug.c
    mv -f .deps/scantool_debug.Tpo .deps/scantool_debug.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_set.o -MD -MP -MF .deps/scantool_set.Tpo -c -o scantool_set.o scantool_set.c
    mv -f .deps/scantool_set.Tpo .deps/scantool_set.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_test.o -MD -MP -MF .deps/scantool_test.Tpo -c -o scantool_test.o scantool_test.c
    mv -f .deps/scantool_test.Tpo .deps/scantool_test.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_diag.o -MD -MP -MF .deps/scantool_diag.Tpo -c -o scantool_diag.o scantool_diag.c
    mv -f .deps/scantool_diag.Tpo .deps/scantool_diag.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_vag.o -MD -MP -MF .deps/scantool_vag.Tpo -c -o scantool_vag.o scantool_vag.c
    mv -f .deps/scantool_vag.Tpo .deps/scantool_vag.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_dyno.o -MD -MP -MF .deps/scantool_dyno.Tpo -c -o scantool_dyno.o scantool_dyno.c
    mv -f .deps/scantool_dyno.Tpo .deps/scantool_dyno.Po
    gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -g -O2 -MT scantool_aif.o -MD -MP -MF .deps/scantool_aif.Tpo -c -o scantool_aif.o scantool_aif.c
    mv -f .deps/scantool_aif.Tpo .deps/scantool_aif.Po
    gcc  -g -O2   -o scantool scantool.o scantool_cli.o scantool_debug.o scantool_set.o scantool_test.o scantool_diag.o scantool_vag.o scantool_dyno.o scantool_aif.o libdiag.a libdyno.a -lm 
    libdiag.a(diag_general.o): In function `diag_init':
    /home/mark/downloads/freediag-1.00c/scantool/diag_general.c:52: undefined reference to `diag_l0_config'
    /home/mark/downloads/freediag-1.00c/scantool/diag_general.c:55: undefined reference to `diag_l2_config'
    collect2: ld returned 1 exit status
    make[3]: *** [scantool] Error 1
    make[3]: Leaving directory `/home/mark/downloads/freediag-1.00c/scantool'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/mark/downloads/freediag-1.00c/scantool'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/mark/downloads/freediag-1.00c'
    make: *** [all] Error 2
  • Anonymous - 2012-10-30

    Oh by the way, I'm using the latest version (freediag 1.0.0c) on a computer running CrunchBang Linux.

    uname -a:

    Linux HAL-Crunchbang 2.6.36-2.dmz.5-liquorix-amd64 #1 ZEN SMP PREEMPT Tue Dec 14 20:40:25 CST 2010 x86_64 GNU/Linux
  • CSB

    CSB - 2012-10-30

    can you paste the contents of scantool/diag_config.c  ? that's where diag_l0_config should be defined if I recall.

  • Anonymous - 2012-10-31

    Maybe this has something to do with it - diag_config.c is a blank file. I'm going to go download the previous version and see if diag_config.c is blank as well. If it has text, I'll swap it in to my version and see if the compiler likes that better

  • CSB

    CSB - 2012-10-31

    yes, diag_config.c is generated at make time (normally) based on l0config and l2config. You can figure out how that works by looking inside scantool/Makefile.am… at some point genconfig.sh is called and something probably went wrong at that point. Not sure what, it's been a while since I worked on the makefiles.
    I think you might try deleting diag_config.c and running make again, see if it gets generated. Also read the l0config and l2config files, they shouldn't be empty.

  • nihil

    nihil - 2012-11-01

    Compiling the latest is a permissions issue. The quick and dirty way, start with a clean un-7z of the source, then chmod -R 755 freediag*, then ./configure; make as usual.

    After that you'll run into a naming issue with the db files when you run scantool. It will try to open freediag_carsim.db, a file that doesn't exist. ln -s freediag_carsim_all.db freediag_carsim.db will sort that out enough to test the scantool. I haven't tried connecting it to a car yet.


Log in to post a comment.