DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th August 2012
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Question gmake can't find tcl/tk

Hello everybody.

I'm trying to compile linuxCNC on Puffy.

But the gmake command give me :
Code:
In file included from emc/usr_intf/axis/extensions/_toglmodule.c:2:
./emc/usr_intf/axis/extensions/togl.c:66:4: error: #error Sorry Togl requires Tcl/Tk ver 8.0 or higher.
I've got the tcl8.4, tk8.4, tcl8.5 & tk8.5 packages installed.

With ./configure, I used the --with-tclConfig & --with-tkConfig options.

But what can I use with gmake ?

I tried
Code:
# export CFLAGS="-I/usr/local/include $CFLAGS"
# export LDFLAGS="-L/usr/local/lib/tcl $LDFLAGS"
Also tried
Code:
# gmake -ltcl85 -ltk85 -libtcl -libtk
Sure it's a stupid thing, but I cannot point it.
Anybody got an idea ?
Reply With Quote
  #2   (View Single Post)  
Old 12th August 2012
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by LeFrettchen View Post
I'm trying to compile linuxCNC on Puffy.

But the gmake command give me :
Code:
In file included from emc/usr_intf/axis/extensions/_toglmodule.c:2:
./emc/usr_intf/axis/extensions/togl.c:66:4: error: #error Sorry Togl requires Tcl/Tk ver 8.0 or higher.
Welcome!

In general, this site doesn't provide support for porting new (not already found in the ports tree...) applications to OpenBSD as the number of people who answer questions here is quite small, & porting can become very tedious. On occasion, a question may be asked in which a member has significant experience. We welcome such exchanges to take place.

However, porting can frequently be very details oriented, skills intensive, & time consuming. Managing expectations & leveraging skill sets can be difficult from both sides. Because of the magnitude of unknowns, we usually state upfront that this level of support is outside of what we can sustain.

If any member wishes to help you in your quest, they are encouraged to speak up.

Recognize that Linux uses a different filesystem structure, & the libraries available may not always be the same. Likewise, no information was provided as to what version of OpenBSD you are doing your work. You will likely need to dig into the code yourself to understand why the configuration files are not finding Tcl/Tk. My initial guess is because it may not be located in the same location as where it would be typically found on a Linux installation.

Good luck in your quest.

Last edited by ocicat; 12th August 2012 at 05:03 PM. Reason: clarity
Reply With Quote
  #3   (View Single Post)  
Old 13th August 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I took a quick look through the mailing list archives (misc@, ports@) and found no mention of LinuxCNC or the previous project named EMC2). If you don't get any positive responses here, you might try the ports@ mailing list. However, a complete description of the problem will be expected there.

The Porter's Handbook (addendum to FAQ 15) might also be helpful to you, though it does not cover root cause analysis for compilation issues like these.
Reply With Quote
  #4   (View Single Post)  
Old 14th August 2012
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

I found a solution.
I edited the file "./emc/usr_intf/axis/extensions/togl.c", and it seems that gmake is searching "tk8.4a3.h" instead of "tk.h".
So I tried a
Code:
# ln -s /usr/local/include/tk8.4/tk.h /usr/local/include/tk8.4/tk8.4a3.h
and that's it.

Quote:
Originally Posted by ocicat View Post
Welcome!
(...)
Likewise, no information was provided as to what version of OpenBSD you are doing your work.
Thanks, and sorry, just forgot to indicate my OpenBSD 5.1.

Quote:
Originally Posted by ocicat View Post
You will likely need to dig into the code yourself to understand why the configuration files are not finding Tcl/Tk. My initial guess is because it may not be located in the same location as where it would be typically found on a Linux installation.
Well, right, but it's possible to indicate a location with gmake, so that's not a problem, and it's the first thing I tried.

Quote:
Originally Posted by ocicat View Post
Good luck in your quest.
Yeah, I'll need some : that was just one error, the job is not done

Thanks both of you.
Reply With Quote
  #5   (View Single Post)  
Old 15th August 2012
thirdm thirdm is offline
Spam Deminer
 
Join Date: May 2009
Posts: 248
Default

Quote:
Originally Posted by LeFrettchen View Post
I found a solution.
I edited the file "./emc/usr_intf/axis/extensions/togl.c", and it seems that gmake is searching "tk8.4a3.h" instead of "tk.h".
So I tried a
Code:
# ln -s /usr/local/include/tk8.4/tk.h /usr/local/include/tk8.4/tk8.4a3.h
and that's it.
Nasty and hackish, that. The full code around that line, looking at their git repository is the following:
Code:
#ifdef USE_LOCAL_TK_H
  #include "tk8.4a3.h"
#else
  #include <tk.h>
#endif
So I'm not going to look into how USE_LOCAL_TK_H gets defined, but I want to guess this is a specific version they (sometimes?) distribute along with their distribution. I'd think you'd want USE_LOCAL_TK_H to end up not defined. That ought to happen from running the configure script. Looking at http://git.linuxcnc.org/gitweb?p=lin...9cd8a192fafcab there's nothing about how to disable this extension that's failing to build or to specify the include and library directories for Tcl/Tk. Perhaps if you run ./configure --help you'll see something.

Otherwise, the way to debug this build properly is to look at what the configure script did or failed to do. It happens that Makefiles on random software packages do not respect your CFLAGS and LDFLAGS (one of the many reasons why it's much nicer when someone does a port/package for us). Did you have them set before running configure? If there's nothing in configure's output about, blah blah blah,

Never mind that, just look in http://git.linuxcnc.org/gitweb?p=lin...9cd8a192fafcab section 5. See the answer to your question there?
Reply With Quote
  #6   (View Single Post)  
Old 19th August 2012
LeFrettchen's Avatar
LeFrettchen LeFrettchen is offline
Marveled user
 
Join Date: Aug 2012
Location: France
Posts: 405
Default

Quote:
Originally Posted by thirdm View Post
Nasty and hackish, that.
Of course, but I'm still looking for a better solution...

Quote:
Originally Posted by thirdm View Post
The full code around that line, looking at their git repository is the following:
Code:
#ifdef USE_LOCAL_TK_H
  #include "tk8.4a3.h"
#else
  #include <tk.h>
#endif
I know, I already edited the code...


Quote:
Originally Posted by thirdm View Post
Looking at (...)Perhaps if you run ./configure --help you'll see something.
I already made a research, the ./configure needed the location of Tcl/Tk :
Code:
./configure --with-tclConfig=<TclLocation> --with-tkConfig=<TkLocation>
Without that, ./configure can't finish his work.
So I though that was enough, but apparently not...


Quote:
Originally Posted by thirdm View Post
Otherwise, the way to debug this build properly is to look at what the configure script did or failed to do...
Right, but it'll wait tomorrow, I don't have enough beer to do that now
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
gettext-dependent and gmake-dependent ports won't compile on openbsd 5.1 current daemonfowl OpenBSD Packages and Ports 39 17th May 2012 09:14 PM
Can't find portupgrade FreeBee FreeBSD Installation and Upgrading 2 6th January 2010 02:09 PM
pkg_add g95;g95 x.f95: cannot find g95 enpey OpenBSD Packages and Ports 8 27th August 2008 12:48 AM
How to find available IP addresses? bigb89 Programming 16 20th August 2008 07:32 PM
where might I find 'libcamel'? Damien787 FreeBSD Ports and Packages 16 17th June 2008 11:35 PM


All times are GMT. The time now is 08:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick