competing panic declarations building expect on Mac OS X 10.3.4 
Author Message
 competing panic declarations building expect on Mac OS X 10.3.4

10.3 comes with expect 5.3.8, but apparently not with libexpect, which
is what I need. So, I downloaded expect 5.4.1 and tcl 8.3.2 from NIST,
installed tcl without incident, and then tried to make expect. Configure
passed (though it failed to recognize darwin7.4.0), before make plotzes
thusly:

[...]
gcc -pipe -c  -I. -I. -I/Users/irons/Documents/build/tcl8.3.2/generic  
-DEXP_VERSION=\"5.41.0\" -DSCRIPTDIR=\"/usr/local/lib/expect5.41\"
-DEXECSCRIPTDIR=\"/usr/local/lib/expect5.41\" -DTCL_DE{*filter*}
-DUSE_NON_CONST  -DDFLT_STTY="\"sane\""  exp_command.c
In file included from /usr/include/sys/event.h:154,
                 from /usr/include/sys/select.h:71,
                 from
/Users/irons/Documents/build/tcl8.3.2/unix/tclUnixPort.h:61,
                 from
/Users/irons/Documents/build/tcl8.3.2/generic/tclPort.h:27,
                 from exp_command.h:21,
                 from exp_command.c:72:
/usr/include/mach/mach.h:79: error: conflicting types for `Tcl_Panic'
/Users/irons/Documents/build/tcl8.3.2/generic/tclDecls.h:38: error:
previous declaration of `Tcl_Panic'
exp_command.c: In function `Exp_SpawnCmd':
exp_command.c:1224: warning: passing arg 2 of `waitpid' from
incompatible pointer type
exp_command.c: In function `Exp_WaitCmd':
exp_command.c:2589: warning: passing arg 2 of `waitpid' from
incompatible pointer type
exp_command.c:2623: warning: passing arg 2 of `waitpid' from
incompatible pointer type
make: *** [exp_command.o] Error 1

Here's line 38 of mach.h:

extern void       panic(const char *, ...);

And here's line 79 of tclDecls.h:

EXTERN void    Tcl_Panic _ANSI_ARGS_(TCL_VARARGS(char *,format));

I don't see from this why they conflict, but the manpage for Tcl_Panic
does show a "void panic(format, arg, arg, ...)" declaration that clashes
with the one defined by mach.h.

Any suggestions at this point? I'm a little outside my comfort zone.

Thanks,

  -nat



Thu, 11 Jan 2007 05:58:53 GMT  
 competing panic declarations building expect on Mac OS X 10.3.4
Looks like a conflict between Tcl's panic (Tcl_Panic) and the system
panic because Tcl uses "panic" as an old shorthand (Tcl has a #define
that redefines panic to Tcl_Panic).

Make sure you are using the latest version of Tcl.  The one you
mention is old.  Rebuild Tcl using a new one.  Then rebuild Expect.
You might have to show some logs to convince me that you rebuilt Tcl
without error and only got these errors building Expect.  This is the
kind of error that is specific to Tcl.  If you do get an error
building Tcl, please repost without using the word "Expect" in the
subject line so as not to distract people from the real problem.

Don

Quote:

> 10.3 comes with expect 5.3.8, but apparently not with libexpect, which
> is what I need. So, I downloaded expect 5.4.1 and tcl 8.3.2 from NIST,
> installed tcl without incident, and then tried to make expect. Configure
> passed (though it failed to recognize darwin7.4.0), before make plotzes
> thusly:

> [...]
> gcc -pipe -c  -I. -I. -I/Users/irons/Documents/build/tcl8.3.2/generic  
> -DEXP_VERSION=\"5.41.0\" -DSCRIPTDIR=\"/usr/local/lib/expect5.41\"
> -DEXECSCRIPTDIR=\"/usr/local/lib/expect5.41\" -DTCL_DE{*filter*}
> -DUSE_NON_CONST  -DDFLT_STTY="\"sane\""  exp_command.c
> In file included from /usr/include/sys/event.h:154,
>                  from /usr/include/sys/select.h:71,
>                  from /Users/irons/Documents/build/tcl8.3.2/unix/tclUnixPort.h:61,
>                  from /Users/irons/Documents/build/tcl8.3.2/generic/tclPort.h:27,
>                  from exp_command.h:21,
>                  from exp_command.c:72:
> /usr/include/mach/mach.h:79: error: conflicting types for `Tcl_Panic'
> /Users/irons/Documents/build/tcl8.3.2/generic/tclDecls.h:38: error:
> previous declaration of `Tcl_Panic'
> exp_command.c: In function `Exp_SpawnCmd':
> exp_command.c:1224: warning: passing arg 2 of `waitpid' from
> incompatible pointer type
> exp_command.c: In function `Exp_WaitCmd':
> exp_command.c:2589: warning: passing arg 2 of `waitpid' from
> incompatible pointer type
> exp_command.c:2623: warning: passing arg 2 of `waitpid' from
> incompatible pointer type
> make: *** [exp_command.o] Error 1

> Here's line 38 of mach.h:

> extern void       panic(const char *, ...);

> And here's line 79 of tclDecls.h:

> EXTERN void    Tcl_Panic _ANSI_ARGS_(TCL_VARARGS(char *,format));

> I don't see from this why they conflict, but the manpage for Tcl_Panic
> does show a "void panic(format, arg, arg, ...)" declaration that clashes
> with the one defined by mach.h.

> Any suggestions at this point? I'm a little outside my comfort zone.

> Thanks,

>   -nat



Sat, 13 Jan 2007 04:36:17 GMT  
 competing panic declarations building expect on Mac OS X 10.3.4


Quote:
> Make sure you are using the latest version of Tcl.  The one you
> mention is old.  Rebuild Tcl using a new one.  Then rebuild Expect.
> You might have to show some logs to convince me that you rebuilt Tcl
> without error and only got these errors building Expect.  This is the
> kind of error that is specific to Tcl.

Sure looks that way. However, I built tcl 8.4.7, rebuilt expect 5.4.1,
and wound up with the same error in the same place.

Here's a log of my process:

  http://bumppo.net/tcl-expect-buildlog.txt

I went the TCL_LIBRARY route on this machine, but when testing with tcl
8.3.2, I found identical results when I fully installed tcl on a separate
10.3.4 box. (The failures to build Tk are expected; I don't need it.)

Incidentally, I went with 8.3.2 after I retrieved it from NIST:
<http://expect.nist.gov/tcl.tar.gz>. Expect's README file contains
pretty explicit instructions along those lines:

Quote:
> The usual way of using Expect is as a standalone program with Tcl as
> the control language.  Since you may already have Tcl, it is available
> separately.  Tcl may be retrieved as tcl.tar.Z in the same way as
> described above for Expect.

Thanks again,

  -nat



Sat, 13 Jan 2007 13:43:33 GMT  
 competing panic declarations building expect on Mac OS X 10.3.4
Nat,


Quote:

> So, I downloaded expect 5.4.1 and tcl 8.3.2 from NIST,
> installed tcl without incident, and then tried to make expect. Configure
> passed (though it failed to recognize darwin7.4.0),

this is due to an old config.guess, it does no harm, but you can always
copy the more recent config.* files from /usr/share/libtool/

Quote:

> Any suggestions at this point? I'm a little outside my comfort zone.

I fixed this as follows:

http://tcltkaqua.sourceforge.net/darwin-TclBI/tcl_ext/expect/expect.diff

also in that directory is a makefile (includes TEA.make in parent dir)
that will build expect against Tcl.framework; this is what I've
submitted to Apple for inclusion in Mac OS X 10.4. Note that this needs
the expect sources from SF as the ones from NIST are not stubs aware.

Mac OS X expect binaries are also part of my TclTkAquaBI distribution,
the upcoming 8.4.7 release will have expect buit essentially as above

   http://tcltkaqua.sourceforge.net/

Cheers,

Daniel

--
** Daniel A. Steffen     **  "And now to something completely
** Dept. of Mathematics  **   different"    Monty python

** NSW 2109 Australia    **  <http://www.maths.mq.edu.au/~steffen/>



Sun, 14 Jan 2007 05:39:01 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. FOX and FXRuby on Mac OS X 10.2.2

2. scheme48 dynamic-load and Mac OS X 10.2.2 (Jaguar)

3. g77 (gcc 3.3) bug on Mac OS X 10.2.8

4. Mailman 2.0.6 on Mac OS X Server 10.0.4/Python 2.1

5. Python 2.1 running on Mac OS X 10.0.1 here

6. tcl 8.4a3 on darwin (mac os 10) - wish 8.4a3 on xdarwin

7. mac os 10 packages

8. mac os 10: empty text buttons vaporize wish 8.4

9. ANN: LispWorks 4.3 for MAC OS X (10.2.3) Beta version now available

10. IDLE on Mac OS 10.2.2

11. Building apps for Mac OS X only

12. Building 1.8 on Mac OS X

 

 
Powered by phpBB® Forum Software