1

I am currently trying to install xgrafix from PTSG's website. Running configure within xgrafix folders I am running into a problem. It is stating that I must make sure Tcl/Tk is installed correctly and rerun the configure. I have tried remove and re-installing Tcl and Tk without having any luck.

Also, I tried to use different versions of Tcl/Tk in the event that it is not compatible with the most recent update. I am a beginner in using Linux so if you have any tips on how to fix it, that would be appreciated greatly.

configuring with options: --prefix=/usr/local --with-SCALAR=double --enable-fulloptimize --with-XGRAFIX-lib=/usr/local/lib --with-XGRAFIX-include=/usr/local/include 
configure: WARNING: unrecognized options: --with-XGRAFIX-lib, --with-XGRAFIX-include
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... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
Using C++ compiler g++
Using C compiler gcc
checking for style of include used by make... GNU
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 dependency style of gcc... gcc3
checking for library containing strerror... none required
checking whether time.h and sys/time.h may both be included... yes
checking for BSD-compatible nm... 
/usr/bin/nm -B
Setting the flags per system and C++ compiler: g++
checking for g++... /usr/bin/g++
Serial C++ compiler is `g++'
checking g++ version... g++
configure: WARNING: Caution: version  is not known to work.
configure: WARNING: C++ compiler may generate code for this processor only.
checking for -fsquangle... no
checking how to build libraries... with ar cr  
checking for gcc... /usr/bin/gcc
Serial C compiler is `gcc'
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking how to run the C++ preprocessor... g++ -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 for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking whether c++ compiler supports exception handling... yes
checking whether c++ compiler supports typename... yes
checking whether c++ compiler can explicitly instantiate templates... yes
checking whether c++ compiler supports RTTI... yes
checking whether c++ compiler supports namespaces... yes
checking whether c++ compiler has complex in the namespace std... yes
checking whether c++ compiler has streams in the namespace std... yes
checking whether c++ compiler can overload const type conversions... yes
checking whether c++ compiler knows mutable... yes
checking whether template friends need brackets... yes
checking whether nontype template operators are allowed... no
checking whether static variables can be declared generally... yes
configure: WARNING: Fortran libraries will be invalid.
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for ranlib... ranlib
checking what the library suffix is... .a
checking how to install libraries... with ${INSTALL} -m 644
configure: WARNING: x11.m4 is obsolete.  Please use AC_PATH_X or AC_PATH_XTRA.
checking for X11/Xlib.h... /usr/include/X11/Xlib.h
checking for libX11.a... /usr/lib/x86_64-linux-gnu/libX11.a
checking for libXpm.a... /usr/lib/x86_64-linux-gnu/libXpm.a
checking for tclsh... /usr/bin/tclsh
checking for tclConfig.sh... /usr/lib/x86_64-linux-gnu/tclConfig.sh
checking for tkConfig.sh... /usr/lib/x86_64-linux-gnu/tkConfig.sh
checking for libtcl8.6.a... no
checking for libtcl8.6.so... no
configure: error: Make sure Tcl/Tk are installed correctly on your
 system and then rerun configure.
Maythux
  • 84,289
cgnick
  • 11

3 Answers3

1

It seems like the provided configure script is incompatible with current systems. Running autoconf to generate a new script appears to fix the Tcl/Tk errors, but introduces other errors related to X11 includes and libraries.

I was finally able to get ./configure to complete by starting over with a freshly-unpacked tarball and setting explicit TCL_LIBDIR_PATH and TK_LIBDIR_PATH on the ./configure command line:

TCL_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ \
TK_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ \
./configure --with-tclsh=/usr/bin/tclsh8.5 \
--with-tclconfig=/usr/lib/tcl8.5 \
--with-tkconfig=/usr/lib/tk8.5

However, in spite of 8.5 being listed as one of the legal_tcl_versions, the make fails with a Tcl-related error

xgsetup.c: In function ‘XGSetupWindow’:
xgsetup.c:145:14: error: ‘Tcl_Interp’ has no member named ‘result’
     if(interp->result != NULL) {
              ^
xgsetup.c:146:27: error: ‘Tcl_Interp’ has no member named ‘result’
       printf("%s\n",interp->result);
                           ^

Following TIP #330: Eliminate interp->result from the Public Headers, you may be able to workaround this by passing flag -DUSE_INTERP_RESULT on the make command line:

make CPPFLAGS="-DUSE_INTERP_RESULT"

the package appeared to build successfully, but I did not install or test it.

steeldriver
  • 136,215
  • 21
  • 243
  • 336
1

I used the solution by steeldriver, but I also had to add ABS_XLIB_H_PATH=/usr/include and ABS_X11LIB_PATH=/usr/include to solve the X11 no directory error (/usr/include should be replaced with the path where your X11 is located, if it is not in /usr/include).

    TCL_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ 
    TK_LIBDIR_PATH=/usr/lib/x86_64-linux-gnu/ 
    ABS_XLIB_H_PATH=/usr/include ABS_X11LIB_PATH=/usr/include
    ./configure --with-tclsh=/usr/bin/tclsh8.5 
    --with-tclconfig=/usr/lib/tcl8.5 
    --with-tkconfig=/usr/lib/tk8.5

And then remember to run make with suggested flaggs:

    make CPPFLAGS="-DUSE_INTERP_RESULT"

I got some errors for the libpng not found, probably since the libpng is lib12png. This was not vital for making the build procced and I guess it can be fixed by replacing libpng with lib12png somewhere in the configure file. Further one likely also have to add the correct path using the proper parameter which should also be possible to find in the configure file and which is then done as with "some_path_indetifier_for_lib12png"=/path/to/lib12png/.

Jakob
  • 11
  • 1
-1

The error runs here:

checking for libtcl8.6.a... no

checking for libtcl8.6.so... no

This indicates that the package **libtcl8.6** is not installed in your system, you can install it in your system:

sudo apt-get install tcl8.6
Maythux
  • 84,289
  • I have already tried this with no luck. I even located those 2 files in the tcl8.6 folder so I think it is looking for those 2 files in the wrong places – cgnick May 28 '15 at 11:31