LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-15-2016, 05:05 PM   #1
LordFrieza
LQ Newbie
 
Registered: Oct 2016
Posts: 3

Rep: Reputation: Disabled
Unhappy Makefile errors when attempting to configure TkGate Linux software on Windows using Cygwin


Note
I'd firstly like to say that I am aware that this probably isn't the correct location for this question, however I was unable to create a new thread in General, so I'm asking here instead.
Scenario
I need to use a program called TkGate for some uni work, however it was made for Linux and only works on Windows if I can use Cygwin.

I installed Cygwin, making sure to select the tcl and tk packages which are prerequisites for TkGate.

I then downloaded tkgate-1.8.5.tgz, and extracted it with the tar command. The README file said to run the configuration script ./configure, so I did this, however, I got a warning message saying that the tcl/tk components could not be located. The README does go on to say:
> Normally the configuration will take place fully automatically , but
> if some components such as tcl/tk are in non-standard locations you
> may need to edit config.h and add the required directories to
> TKGATE_INCDIRS and TKGATE_LIBDIRS.
Issues
So I attempted to edit these values in the config.h file and ran ./configure again. Here is the output when I run it, with a lot of error messages:

Code:
$ ./configure
    C compiler: gcc
    Auto-configuring language to 'en' (LANG=en_US.UTF-8).
    Tcl/Tk Version: 8.5
    Configuring for Western language support.
    Tcl script files found in: /usr/lib/tcl8.5
    Tk script files found in: /usr/lib/tk8.5
    bison found
    which: no lex in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files/ImageMagick-6.9.3-Q16:/cygdrive/c/ProgramData/Oracle/Java/javapath:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/EgisTec BioExcess/x64:/cygdrive/c/Program Files (x86)/EgisTec BioExcess:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files (x86)/Java/jre1.8.0_45/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/Program Files (x86)/GtkSharp/2.12/bin:/cygdrive/c/Program Files (x86)/Skype/Phone:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/Client SDK/ODBC/130/Tools/Binn:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/130/DTS/Binn:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/130/Tools/Binn/ManagementStudio:/cygdrive/c/WINDOWS/system32/config/systemprofile/.dnx/bin:/cygdrive/c/Program Files/Microsoft DNX/Dnvm:/cygdrive/c/Users/Patrick/AppData/Local/Microsoft/WindowsApps:/usr/lib/lapack)
    flex found
    lex test OK.
    yyrestart found.
    found X11/Xlib.h in: /usr/include
    long long supported
    getopt uses optreset.
    WARNING: getopt does handle switches after file names.
    *** updating config.h
    tail: cannot open '+377' for reading: No such file or directory
    *** doing xmkmf
    In file included from ./Imakefile:19:0,
                     from /usr/lib/X11/config/Imake.tmpl:2194,
                     from Imakefile.c:15:
    ./config.h:385:0: error: #endif without #if
     #endif
     ^
    ./config.h:387:0: error: #endif without #if
     #endif
     ^
    imake: Exit code 1.
      Stop.
    In file included from ./Imakefile:2:0,
                     from /usr/lib/X11/config/Imake.tmpl:2194,
                     from Imakefile.c:15:
    ./../../config.h:385:0: error: #endif without #if
     #endif
     ^
    ./../../config.h:387:0: error: #endif without #if
     #endif
     ^
    imake: Exit code 1.
      Stop.
    In file included from ./Imakefile:18:0,
                     from /usr/lib/X11/config/Imake.tmpl:2194,
                     from Imakefile.c:15:
    ./../../config.h:385:0: error: #endif without #if
     #endif
     ^
    ./../../config.h:387:0: error: #endif without #if
     #endif
     ^
    imake: Exit code 1.
      Stop.
    In file included from ./Imakefile:2:0,
                     from /usr/lib/X11/config/Imake.tmpl:2194,
                     from Imakefile.c:15:
    ./../../config.h:385:0: error: #endif without #if
     #endif
     ^
    ./../../config.h:387:0: error: #endif without #if
     #endif
     ^
    imake: Exit code 1.
      Stop.
    In file included from ./Imakefile:18:0,
                     from /usr/lib/X11/config/Imake.tmpl:2194,
                     from Imakefile.c:15:
    ./../../config.h:385:0: error: #endif without #if
     #endif
     ^
    ./../../config.h:387:0: error: #endif without #if
     #endif
     ^
    imake: Exit code 1.
      Stop.
    *** doing includes
    Makefile:8: *** missing separator.  Stop.
    *** doing dependencies
    Makefile:8: *** missing separator.  Stop.
    *************************************************************
    Configuration Results:
      Language Support: Western (English and European)
      C Compiler:       gcc
      Tcl/Tk Version:   8.5
      Library Path:      -L/usr/lib
      Include Path:      -I/usr/include
      Libraries:         -ltk8.5 -ltcl8.5 -lX11 -ldl -lm
      Primary Home:     /usr/X11R6/lib/tkgate-1.8.5
      Secondary Home:   /home/Patrick/build/tkgate-1.8.5
      optreset usage:   1
      long long usage:  1
      Ephemeral Signal: 1
      Use sigset:       0
      Yacc:             bison -y
      Lex:              flex -l
      No yyrestart:     0
    *************************************************************
    * Configuration complete - type 'make' to compile.
    *************************************************************
And when I try to run the make command as it says to do, I get this message saying that there is something wrong on line 8 of the Makefile:

Code:
    Patrick@PatGamingLaptop ~/build/tkgate-1.8.5
    $ make
    Makefile:8: *** missing separator.  Stop.
The Makefile generated is ~6000 lines long so I won't post it's full contents. However, these are the first 20 lines:

Code:
    # 1 "Imakefile.c"
    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1 "Imakefile.c"
    
    # 15 "Imakefile.c"
    # 1 "/usr/lib/X11/config/Imake.tmpl" 1
    XCOMM ----------------------------------------------------------------------
    XCOMM Makefile generated from "Imake.tmpl" and <Imakefile>
    XCOMM $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
    XCOMM $XdotOrg: xc/config/cf/Imake.tmpl,v 1.9 2005/01/24 06:37:31 daniels Exp $
    XCOMM
    XCOMM
    XCOMM
    XCOMM
    XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $
    XCOMM ----------------------------------------------------------------------
If anyone could help me to configure and install the software I would be very grateful.
 
Old 10-15-2016, 09:22 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Hi,

You might give the more recent version in the Debian repos a try. It looks like it auto detects cygwin: https://packages.debian.org/sid/tkgate

Here is the link to download the source code: http://http.debian.net/debian/pool/m...10.orig.tar.gz

Otherwise, we'll need to see the changes that you made to config.h
 
1 members found this post helpful.
Old 10-16-2016, 07:03 AM   #3
LordFrieza
LQ Newbie
 
Registered: Oct 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the help, but now I have a problem with this version as well. When I run the ./configure, I get an error message saying that it couldn't guess build type; and that I must specify one. How would I go about doing this? I tried ignoring this issue and running the make command but unfortunately it didn't work.

Code:
Patrick@PatGamingLaptop ~/build/tkgate-2.0-b10
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
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 bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... (cached) ranlib
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2003-07-02, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

    ftp://ftp.gnu.org/pub/gnu/config/

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2003-07-02

uname -m = x86_64
uname -r = 2.6.0(0.304/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2016-08-31 14:32

/usr/bin/uname -p = unknown
/bin/uname -X     =

hostinfo               =
/bin/universe          =
/usr/bin/arch -k       =
/bin/arch              = x86_64
/usr/bin/oslevel       =
/usr/convex/getsysinfo =

UNAME_MACHINE = x86_64
UNAME_RELEASE = 2.6.0(0.304/5/3)
UNAME_SYSTEM  = CYGWIN_NT-10.0
UNAME_VERSION = 2016-08-31 14:32
configure: error: cannot guess build type; you must specify one

Patrick@PatGamingLaptop ~/build/tkgate-2.0-b10
$ make
make: *** No targets specified and no makefile found.  Stop.
 
Old 10-16-2016, 10:06 AM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
First try specifying the build type:
Code:
./configure --build=x86_64-pc-cygwin
If that doesn't work, copy config.guess and config.sub from the link in the configure output: ftp://ftp.gnu.org/pub/gnu/config/

The old config.guess is only checking for a 32 bit system:
Code:
    i*:CYGWIN*:*)
    echo ${UNAME_MACHINE}-pc-cygwin
    exit 0 ;;
v. the config.guess from the link:
Code:
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
    echo x86_64-unknown-cygwin
    exit ;;
HTH
 
Old 10-16-2016, 02:12 PM   #5
LordFrieza
LQ Newbie
 
Registered: Oct 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for the reply. I specified the build as you said and the configuration finally worked. I ran the make command and installed the software, however, when I try to run it I get this output:
Code:
Patrick@PatGamingLaptop ~
$ tkgate
TkGate 2.0-b10 - Digital Circuit Editor and Simulator (released Sep 26 2009)
[Compiled Oct 16 2016 19:57:02]
Copyright (C) 1987-2009 by Jeffery P. Hansen
  TkGate comes with ABSOLUTELY NO WARRANTY;  see 'Help...License' menu
  for license and warranty details.  Report problems to hansen@tkgate.org
Segmentation fault (core dumped)
The program doesn't run, and a file called tkgate.exe.stackdump is created in /usr/local/bin containing the following information:
Code:
Exception: STATUS_ACCESS_VIOLATION at rip=003D3C9BCC0
rax=0000000000000000 rbx=0000000000000000 rcx=0000000000000000
rdx=00000003D3D50259 rsi=000000060003A8E0 rdi=0000000000000001
r8 =0000000000000000 r9 =0000000600144198 r10=0000000000000013
r11=00000006001B1AB0 r12=000000060003A8E0 r13=000000060005C1C0
r14=000000060003CDE0 r15=0000000000000000
rbp=0000000000000001 rsp=00000000FFFFB938
program=C:\cygwin\usr\local\bin\tkgate.exe, pid 7588, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
 
Old 10-16-2016, 04:36 PM   #6
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Sorry, not sure that I can help as don't run Windows and have never used Cygwin.

Do you have gdb (debugger) installed? The program is compiled with debugging symbols so you should be able to get a backtrace that will show where the error occurs in the source code.

FWIW it compiled and ran fine on my Linux machine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Attempting to get rsync with ssh to work from cygwin client to Linux server vovim Linux - Networking 4 09-23-2015 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration