Menu

#96 init.c isn't copied to build dir

1.4.0
closed
nobody
None
1
2023-04-09
2019-10-05
No

When building outside the source dir, init.c is not copied anymore to the build dir*.

*(In the 1.4.7 release this file was copied).

This breaks the build proces with the error message below.

make[1]: Entering directory '/usr/local/src/BUILD/x86_64-linux/Img-1.4.9/bmp'
gcc -DPACKAGE_NAME=\"tkimgbmp\" -DPACKAGE_TARNAME=\"tkimgbmp\" -DPACKAGE_VERSION=\"1.4.9\" -DPACKAGE_STRING=\"tkimgbmp\ 1.4.9\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tkimgbmp=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -DTKIMG_VERSION=\"1.4.9\" -I"/usr/local/src/BUILD/x86_64-linux/Img-1.4.9/base/../../../../SOURCES/Img-1.4.9/base" -I. -I"/usr/local/src/SOURCES/tk8.5.19/generic" -I"/usr/local/src/SOURCES/tcl8.5/generic"   -DPACKAGE_TCLNAME=\"img::bmp\"  -pipe -m64 -O2 -fomit-frame-pointer -DNDEBUG -Wall -Wwrite-strings -fPIC  -c `echo ../../../../SOURCES/Img-1.4.9/bmp/bmp.c` -o bmp.o
../../../../SOURCES/Img-1.4.9/bmp/bmp.c:30:10: fatal error: init.c: No such file or directory
 #include "init.c"
          ^~~~~~~~
compilation terminated.
make[1]: *** [Makefile:299: bmp.o] Error 1
make[1]: Leaving directory '/usr/local/src/BUILD/x86_64-linux/Img-1.4.9/bmp'
make: *** [Makefile:99: all] Error 2

Discussion

  • Erik Leunissen

    Erik Leunissen - 2019-10-05

    This issue was observed with Img-1.4.9

     
  • Erik Leunissen

    Erik Leunissen - 2019-10-05

    Correction:

    The issue appears to exist with 1.4.7 also. But it has been a while ago that I built that release (outside the source dir), and it seems that I manually adapted the build dir to make the build proceed. So please disregard the statement that init.c was copied to the build dir in release 1.4.7.

     
  • Erik Leunissen

    Erik Leunissen - 2019-10-05

    Still figuring out more, please bear with me with this step by step approach. Suggesting to keep this ticket "on hold" until I post a "definite" notification when I'm done.

    Compiling from inside an external build dir appears not to have anything to do with the issue. The issue occurs also when compiling from inside the source dir.

     

    Last edit: Erik Leunissen 2019-10-05
  • Erik Leunissen

    Erik Leunissen - 2019-10-06

    It appears that when using my automated, site-specific ./configuration command, not a single site-specific options is passed down from the toplevel ./configure to each image-subdir. The actual ./configure command in each image subdir is just "./configure" without any options like --with-tcl and --with-tk, and the image specific configuration process errors out when it cannot find the Tcl and Tk configurations, before copying "init.c".
    However, the overall configuration process proceeds happily, and the build breaks only after the gcc doesn't find "init.c" in the image-specific subdir.

    When manually doing ./configure --with-tcl=somedir --with-tk=somedir, these options are being passed down to the subdirs and init.c is being copied correctly.

    Going to figure out why the build breaks with my automated, site-specific ./configure command.

     

    Last edit: Erik Leunissen 2019-10-07
  • Erik Leunissen

    Erik Leunissen - 2019-10-07

    OK, I finally found the cause.
    The problem appears to be entirely on my side. After fixing it, the build proceeded finely.

    Please disregard/remove/invalidate this ticket.
    Sorry for the noise.

    Erik.

     
  • Erik Leunissen

    Erik Leunissen - 2019-10-14

    B.t.w. all the trouble originated from me redoing a build using the following sequence:

    make clean
    make

    While in many cases this is OK, with tkimg "make clean" removes 'init.c' from the build dir. (init.c being a product of the ./configure step, not from the ./make step).

    Erik.

     
  • Jan Nijtmans

    Jan Nijtmans - 2019-10-14

    Thanks for the analysis: If init.c is produced by the configure step, it means it should be deleted by "make distclean", not by "make clean". Fixed that now.

     
  • Paul Obermeier

    Paul Obermeier - 2023-04-09
    • status: open --> closed
     
  • Paul Obermeier

    Paul Obermeier - 2023-04-09

    Fixed by Jan, so close ticket.

     

Log in to post a comment.