|
$PTOLEMY/doc/html/nt
The most recent version of the instructions can be found at:
http://ptolemy.eecs.berkeley.edu/~cxh/ptpub/nt/index.html
The notes below are very confusing, but you might find some of the information useful if you are having problems.
Places to go
$PTOLEMY/docs/html/nt/ptxpinstall.html
in the CVS download of Ptolemy Classic.
./../lib.xp/libdecontribstars.a(DECIR_uldl.o):DECIR_uldl.cc:(.ctor+0x0): undefied reference to `global constructors keyed to star_nm_DECIR_uldl' ./../lib.xp/libdecontribstars.a(DECIR_uldl.o):DECIR_uldl.cc:(.dtor+0x0): undefied reference to `global destructors keyed to star_nm_DECIR_uldl' ./../lib.xp/libdecontribstars.a(DEMobile_Station.o):DEMobile_Station.cc:(.ctor+x0): undefined reference to `global constructors keyed to star_nm_DEMobile_Stat on' ./../lib.xp/libdecontribstars.a(DEMobile_Station.o):DEMobile_Station.cc:(.dtor+x0): undefined reference to `global destructors keyed to star_nm_DEMobile_Stati n'All the messages are from de/contrib/stars.
Interestingly, some of the constructors are defined, some are not:
$ nm -l /cygdrive/c/cxh/src/ptolemy/lib.xp/libdecontribstars.a | c++filt | gre p "global" U global destructors keyed to star_nm_DECIR_uldl DECIR_uldl.cc:0 U global constructors keyed to star_nm_DECIR_uldl DECIR_uldl.cc:0 U global destructors keyed to star_nm_DEMobile_Station DEMobile_Station .cc:0 U global constructors keyed to star_nm_DEMobile_Station DEMobile _Station.cc:0 00000e10 t global destructors keyed to star_nm_DEParallel2Serial 00000df4 t global constructors keyed to star_nm_DEParallel2Serial 00000d4c t global destructors keyed to star_nm_DEWeighted_List 00000d30 t global constructors keyed to star_nm_DEWeightedList U global destructors keyed to star_nm_DEWiNeS_Tcl_Animation DEWiNeS_ Tcl_Animation.cc:0 U global constructors keyed to star_nm_DEWiNeS_Tcl_Animation DEWiNeS_Tcl_Animation.cc:0 U global destructors keyed to star_nm_DEcell_list DEcell_list.cc:0 U global constructors keyed to star_nm_DEcell_list DEcell_list.cc:0 U global destructors keyed to star_nm_DEpos_generator DEpos_generator.cc:0 U global constructors keyed to star_nm_DEpos_generator DEpos_generator.cc:0 U global destructors keyed to star_nm_DEpropag_uldl DEpropag_uldl.cc:0 U global constructors keyed to star_nm_DEpropag_uldl DEpropag_uldl.cc:0 U global destructors keyed to star_nm_DErrmanager_uldl DErrmanager_uldl.cc:0 U global constructors keyed to star_nm_DErrmanager_uldl DErrmana ger_uldl.cc:0 00001568 t global destructors keyed to star_nm_ 0000154c t global constructors keyed to star_nm_DEDynMap 00001450 t global destructors keyed to star_nm_ 00001434 t global constructors keyed to star_nm_DEDynMapGr 0000090c t global destructors keyed to star_nm_ 000008f0 t global constructors keyed to star_nm_DEDynMerge 00000c0c t global destructors keyed to star_nm_ 00000bf0 t global constructors keyed to star_nm_DEDynForkInt 000008a4 t global destructors keyed to star_nm_ 00000888 t global constructors keyed to star_nm_DEDynForkAll of the failing files include <complex.h>?
The solution was to modify the hinclude{} directive and not include <complex.h>
Error: No such domain: SDF Error: No domains can be located by Ptolemy; something is wrong with your installation of either Ptolemy (no domains were included, perhaps?) or of your C++ compiler and linker (if global constructors aren't being called properly, we also get this symptom). Exiting...This message is produced by
kernel/KnownBlock.cc
when the number of domains is 0.
The problem was that sdfstars.c
was empty because
bin/genStarTable
had a bug.
ftp://ftp.cygnus.com/pub/gnu-win32/latest
.
mkdir /usr cd /usr tar -zxf b19_X11R6_3.tar.gz
c:\usr\X11R6.3\bin
to your path by using the
System
control panel.
DISPLAY=localhost:0.0and then running
/usr/X11R6.3/bin/xclock
.
Start
menu, select Settings
, then
Control Panels
, then System
, then select the
Environment
tab
PTARCH nt4 PTOLEMY /users/ptolemy CC gcc
bash
and cd to the tree with something like:
mkdir /users/ptolemy mount -b //UnixHost/ptolemy /users/ptolemy cd $PTOLEMY(The
-b
option says that text files are equivalent to binary
files)
Now you have three ways to get to the sources using Samba:
Run
Start menu choice. T
cd
to the UNC, such as cd //carson/ptdesign
cd
to the Cygwin mount point: cd /users/ptolemy
Note that you can set PTOLEMY to the raw UNC format
//UnixHost/ptolemy
, but if you do, you will
have problems with configuring Itcl. Instead use the mount
command as above.
http://www.tcltk.com
CC
environment variable to gcc
. If you don't then
you will get errors while configuring.
configure --enable-gcc --disable-load --host=i586-CYGWIN32-NT40
tclEnv.c
fails to compile with messages about
environ
, then edit tcl7.6/generic/tclPort.h
.
Change:
#if defined(__WIN32__) || defined(_WIN32)to
#if (defined(__WIN32__) || defined(_WIN32)) && !defined(__CYGWIN32__)The above change also needs to be made to
tk4.2/generic/tkPort.h
and tk4.2/generic/default.h
tclUnixTime.c
fails to compile with messages about
timezone
.
tcl7.6/unix/Makefile
and change -DHAVE_TIMEZONE_VAR
to
-DHAVE_GETTIMEOFDAY
.
The real fix was to modify configure.in
so that we
run the timezone code instead of just compiling it.
-lc
tcl7.6/unix/Makefile
and commenting
out -lc
unix/tclUnixFCmd.c
: mkinfo()
does not exist.
if (/*mkfifo(dst, srcStatBuf.st_mode)*/ -1 < 0) {
make
, then make install
oct/internal.h
-
cygwin32: errno is actually a function, so we adjust the sys_msg()
macro accordingly
iv/iv.c
- Fixes for HUGE
rpc/appRPC.c
- cygwin32 does not define SIOCSPGRP
pragma interface
.
miscFuncs.o
inline Attribute operator | (const Attribute& a, const Attribute& b) {The problem was that
Attribute.h
had:
#pragma interfaceit needed to be changed to:
#pragma interface "Attribute.h"to better match the
#pragma implementation "Attribute.h"in
miscFuncs.cc
pigilib
contained POct.h
,
poct.h
, PVem.h
, pvem.h
PTcl.h
and ptcl.h
. The C preprocessor
was going into infinite recursion.
.h
files
into the .cc
files that included them.
.exe
, so the
make.template
files in rman-*
,
tkman-*
, optfir
and wfir
needed
to be modified.
de/kernel/Resource.cc
. The following code in
Resource.h
was present, but the symbol could
not be found.
ResLLCell( DERCEvent* e, double time, int prio) : event(e), ECT(time), priority(prio) {}My fix was to move the body of the method into
Resource.cc
ld.exe: final link failed: Permission deniedThe following command can be used to debug
make LINKER="g++ -v -Wl,--trace,--verbose" pigiRpc.ptiny
g++ -Wall -Wsynth -Wno-non-virtual-dtor -g -DPTNT -DPT_NO_TIMER \ -DUSE_DIRENT_H -DNO_SYS_SIGLIST -DPT_ERRNO_IS_A_FUNCTION \ -I../../../../../src/domains/sdf/dfm/stars \ -I../../../../../src/domains/sdf/kernel -I../../../../../src/kernel \ -I../../../../../src/domains/sdf/tcltk/stars -I../../../../../src/tysh \ -I../../../../../src/ptklib -I../../../../../tcltk/itcl/include \ -I../../../../../tcltk/itk/include -I/usr/X11R6.3/include -c \ ../../../../../src/domains/sdf/dfm/stars/SDFFileEval.cc \ In file included from \ C:\\Cygnus\\B19\\H-i386-cygwin32\\lib\\gcc-lib\\i386-cygwin32\\2.7-B19\\../../../../i386-cygwin32/include/windows.h:41, from ../../../../../tcltk/itcl/include/itcl.h:97, from ../../../../../src/tysh/ptk.h:43, from SDFFileEval.pl:171: C:\\Cygnus\\B19\\H-i386-cygwin32\\lib\\gcc-lib\\i386-cygwin32\\2.7-B19\\../../../../i386-cygwin32/include/Windows32/Base.h:93: `typedef float FLOAT' redeclared as different kind of symbol ../../../../../src/kernel/dataType.h:48: previous declaration of `const char * const FLOAT'The problem here is that Cygwin32
Windows32/Base.h
has the line:
typedef float FLOAT;
ptolemy/src/kernel/dataType.h
has
const char * const FLOAT;This comes up because we are including
itcl.h
:
#if defined(__WIN32__) # define WIN32_LEAN_AND_MEAN # include# undef WIN32_LEAN_AND_MEAN
bin/pigiEnv.csh
to Bourne Shell, creating
bin/pigiEnv.sh
.
One issue was that xrdb
was failing because it could not
find cpp
. I hacked up some code that does the right
thing:
xrdb="xrdb -cpp `gcc --print-prog-name cpp| sed 's@\\\@/@g`"
Cannot find technology for cell init.pal:schematic:contents: Unexpected internal error in function tapGetFacetIdFromObj: Cannot open $PTOLEMY/lib/colors/ptolemy/tap.views Either technology "ptolemy" does not exist or viewtype "schematic" is wrong.The message comes from
vem/patterns/tech.c
vemMsg(MSG_A, "Error detected in %s:\nCannot find technology for cell %s:%s:%s:\n %s\n",mounting with the
-b
option helped here.
RPC Error: can not fdopen for write in application RPC Error: cannot connect to the serverThis error comes from
Xpackages/rpc/appNet.c
:
(void) fprintf(stderr, "RPC Error: can not fdopen for write in application\n");I was able to start vem under Unix and then connect to NT and replicate this error, so it must be on the
pigiRpc
side
under NT. After the error errno
is set to 9
#define EBADF 9 /* Bad file number */The Microsoft VC++ manual says:
EBADF Bad file number. There are two possible causes: 1) The specified file handle is not a valid file-handle value or does not refer to an open file. 2) An attempt was made to write to a file or device opened only for read-only access.The eventual fix was to upgrade to Cygwinb19.1, which has a fix for
fdopen
. Below is some info about sockets
www.sockets.com
In UNIX, all handles, including socket handles, are small, non- negative integers, and some applications make assumptions that this will be true. Windows Sockets handles have no restrictions, other than that the value INVALID_SOCKET is not a valid socket. Socket handles may take any value in the range 0 to INVALID_SOCKET-1.
Subject: Re: Porting sockets app from UNIX to NT From: tannenba@cs.wisc.edu (Todd Tannenbaum) Date: 1997/10/17 Message-ID: <626esq$1k4c$1@news.doit.wisc.edu> Newsgroups: comp.os.ms-windows.programmer.tools.winsock
To start vem under Unix and connect to NT, do the following
|
RPC Error: server: panic!!! server closing"Comes from a line in
vem/rpc/server.c
that
checks to see if we got a RPC_ABORT
setenv PTARCH nt4 cd $PTOLEMY; MAKEARCH
README.W32
file.
There are a number of limitations involving names with white space and samba. Also, /bin/sh needs to be present, which requires either cygwin32 or MKS.
Another idea is to compile Vem and Octtools under NT with X11
We are getting more and more NT boxes into our local cluster so we are still interested in the NT port
I recently installed egcs-1.0 under Solaris, so I was able to fix a number of bugs that were causing problems with the Cygnus cygwin-32 compiler that we use under NT. (egcs and cygwin-32 are based on a similar set of sources)
The big stumbling block right now is the lack of a gui. We are working on building something with Tycho, but it is still a ways away. The next Ptolemy release, 0.7.1 due out in the summer will have what ever NT support we have completed. However, I doubt if it will be particularly stable. BTW - We have not yet announced 0.7.1, so please don't discuss it on ptolemy-hackers :-)
We are dropping support of SunOS4.1.3, and I hope to support NT in its place.
#define SO_SNDBUF 0x1001 #define SO_RCVBUF 0x1002including mywinsock.h results in lots of duplicate symbols and definitions.
#define NO_UNAME
#ifdef PT_NT4VC #define strcasecmp(a,b) strcmp((a),(b)) #endif
I was able to compile the kernel, the SDF and DE kernel, all the DE stars and most of the basic SDF stars.
My previous effort had used cygwin17.1beta as a compiler, this time I used cygwin18beta. cygwin18beta now comes with tcl/tk for use with a graphical gdb interface. Since I was having problems linking with tcl/tk, I thought it would be worth giving this a shot.
Unfortunately, I'm still having problems here, ld is saying that tcl76.dll is not a recognized file. I think that I need to mess around with creating a libtcl76.a file. I found some instructions that might help.
However, I'm still having problems linking with tcl. Also, the version of gcc that comes with cygwin18beta is much pickier than the vanilla gcc-2.7.2, so there are lots of warnings.
tycho/kernel/Exec.itcl
so that we
can jump to errors in the make
output
*************** *** 381,388 **** #config -cursor $oldCursor # This might not be an error message, it might just be whatever ! # exec returned ! addHistory "$errMsg\n" if {$statusVariableName == "abnormal"} { addHistory "<>\n" } --- 381,393 ---- #config -cursor $oldCursor # This might not be an error message, it might just be whatever ! # exec returned. We process it one line at a time so we ! # can create hotlinks to the errors. ! set historyList [split $errMsg '\n'] ! foreach historyLine $historyList { ! addHistory "$historyLine\n" ! } ! if {$statusVariableName == "abnormal"} { addHistory "< >\n" }
Matrix.cc
, Particle.cc
and TimeVal.cc
, see below for fixes.
ptlang
by using byacc
and then editing ptlang.c
and commenting out the
#include <malloc.h>
line
ptlang
fails to install because the binary
is actually named ptlang.exe
. I installed it by hand
bash
:
PTOLEMY=c:/users/cxh/pt/ptolemy PATH=$PTOLEMY/bin.nt4:$PTOLEMY/bin:$PATH mkdir $PTOLEMY/bin.nt4 $PTOLEMY/lib.nt4
DEDelay.cc
fails to compile, g++ fails with a corrupt stack.
I exited and restarted bash
and the problem went away!
(c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) In cygwin_except_handler (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) Exception trapped! (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) exception C0000005 at 10029 D0 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) exception: ax 241DB63 bx 20 2B2B cx 241DB54 dx 2F (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) exception: si FFFFFFFF di 2 1DB54 bp 241DA28 sp 241DA24 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) exception is: STATUS_ACCESS VIOLATION (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) Stack trace: (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 0: sp = 0x241D858, pc = 0x1000CEC2 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 1: sp = 0x241D874, pc = 0x77F94072 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 2: sp = 0x241D898, pc = 0x77F88A53 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 3: sp = 0x241D924, pc = 0x77F75E82 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 4: sp = 0x241DA28, pc = 0x10016211 (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) frame 5: sp = 0x241DC58, pc = 0x65642F3A (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) In cygwin_except_handler (c:\gnuwin32\b18\H-i386-cygwin32\bin\make.exe 1003) Error while dumping state ( robably corrupted stack) make: *** [DEDelay.o] Error 2
sdf/stars/SDFAddCx
fails to compile:
SDFAddCx.pl: In method `void SDFAddCx::go()': SDFAddCx.pl:27: call of overloaded `Complex(Particle &)' is ambiguous ../../../../src/kernel/ComplexSubset.h:50: candidates are: Complex::Complex(double, double) ../../../../src/kernel/ComplexSubset.h:51: Complex::Complex(const Complex &) g++: Internal compiler error: program cc1plus got fatal signal 33 make: *** [SDFAddCx.o] Error 1 bash$
/gnuwin32/b18/tcl/bin/tcl76.dll: file not recognized: File format not recognized
tclsh
fails to link
Lbash$ make gcc tclAppInit.c -I/Itcl2.2/tcl7.6/generic -o tclsh /gnuwin32/b18/tcl/bin/tcl76. dll /gnuwin32/b18/tcl/bin/tcl76.dll: file not recognized: File format not recognized gcc: Internal compiler error: program ld got fatal signal 1 make: *** [tclsh] Error 1 bash$I think the fix might be to create a tcl76.a by following the instructions in
http://www.cygnus.com/misc/gnu-win32/building-reloc-dlls.txt
configure --build=i586-intel-winnt4 --host=i586-intel-winnt4but various .h files were missing.
http://www.cygnus.com/misc/gnu-win32
. Below are my notes from the port.
The general idea is to build first a ptcl that contains no domains, and then to add the sdf domain.
After a few changes, I was able to compile the kernel, the ptcl library and a few of the utilities libraries. However, I was unable to run the ptcl executable, there are problems with dynamic libraries and entry points.
Some of the changes below will probably appear in 0.7, such as the
extension to ptarch
so that it will return
nt4
.
MAKEARCH
uses csh
, which is not party
of cygwin. There are NT versions of csh
available, but
in the short term, I built in the src/
tree instead of in
a separate obj.nt4
tree.
config-nt4.mk
file.
Linker.h
fails:
Linker.sysdep.h:332: a.out.h: No such file or directoryAdded #if !defined(PTNT)
src/compat/ptolemy/compat.h
: don't declare putenv under NT
SimControl:
SimControl.cc:305: aggregate `struct itimerval i' has incomplete type and cannot be initialized.Looks like there is no itimer, so I commented out part of SimControl::setPollTimer
Matrix.cc
In method `ComplexMatrix::ComplexMatrix(int, int, PortHole &)': Matrix.cc:527: call of overloaded `Complex(Particle &)' is ambiguous ComplexSubset.h:50: candidates are: Complex::Complex(double, double) ComplexSubset.h:51: Complex::Complex(const Complex &) Matrix.cc: In method `FixMatrix::FixMatrix(int, int, PortHole &)': Matrix.cc:921: call of overloaded `Fix(Particle &)' is ambiguous Fix.h:184: candidates are: Fix::Fix(double) Fix.h:200: Fix::Fix(const Fix &)Line 527 is:
entry(i) = Complex(ph%(totalDataSize - i - 1);)Line 921 is:
data[i] = Fix(ph%(totalDataSize - i - 1));Offhand, I'm not totally sure what the right fix would be, so I just added a cast to
(const Complex &)
and (const Fix &)
to the test sources. I did
not check this change in to the 0.7 tree.
Particle.cc:
Particle.cc:264: call of overloaded `Complex(const Particle &)' is ambiguous ComplexSubset.h:50: candidates are: Complex::Complex(double, double) ComplexSubset.h:51: Complex::Complex(const Complex &) Particle.cc: In method `int ComplexParticle::operator ==(const class Particle &)': Particle.cc:270: call of overloaded `Complex(const Particle &)' is ambiguous ComplexSubset.h:50: candidates are: Complex::Complex(double, double) ComplexSubset.h:51: Complex::Complex(const Complex &) Particle.cc:271: warning: control reaches end of non-void function ComplexParticle::operator ==(const Particle &)' Particle.cc: In method `class Particle & FixParticle::operator=(const class Particle &)': Particle.cc:353: call of overloaded `Fix(const Particle &)' is ambiguous Fix.h:184: candidates are: Fix::Fix(double) Fix.h:200: Fix::Fix(const Fix &) Particle.cc: In method `int FixParticle::operator ==(const class Particle &)': Particle.cc:359: call of overloaded `Fix(const Particle &)' is ambiguous Fix.h:184: candidates are: Fix::Fix(double) Fix.h:200: Fix::Fix(const Fix &)Same situation as
Matrix.cc
, I added some casts,
but did not add these changes to the 0.7 tree.
ProfileTimer.cc:
ProfileTimer.cc: In method `ProfileTimer::ProfileTimer()': ProfileTimer.cc:51: aggregate `struct itimerval year' has incomplete type and cannot be initialized ProfileTimer.cc:59: warning: implicit declaration of function `int setitimer(...)' ProfileTimer.cc:59: `ITIMER_PROF' undeclared (first use this function)Ifdef'd code out with PT_NO_TIMER
TimeVal.cc: In method `int TimeVal::operator >(const class TimeVal &) const': TimeVal.cc:124: warning: implicit declaration of function `int timercmp(...)' TimeVal.cc:124: syntax error before `>' TimeVal.cc:125: warning: control reaches end of non-void function `TimeVal::operator >(const TimeVal &) const' TimeVal.cc: In method `int TimeVal::operator <(const class TimeVal &) const': TimeVal.cc:129: syntax error before `<' TimeVal.cc:130: warning: control reaches end of non-void function `TimeVal::operator <(const TimeVal &) const'Line 124 looks like:
return timercmp(this, &t, >);
timercmp
is defined in /usr/include/sys/time.h
, but apparently
it is not defined under cygwin.
I modified the test tree I was using, but did not check this change into the developmenttree.
Tokenizer.cc:
Tokenizer.cc:251: ANSI C++ forbids comparison between pointer and integerLine 251 is:
else if (strchr (whitespace, c) == NULL) break;Added #include
extern "C" char * strchr(const char *, int);
This change did not make it into the development tree. I don't
I modified the test tree I was using, but did not check this change into the development tree.
MathematicaTcl.cc:#include "tcl.h" MatlabTcl.cc:#include "tcl.h" ptclAppInit.cc:#include "tcl.h" ptclAppInit.cc:#include "itcl.h"
PTcl.cc
fails to compile with:
PTcl.cc:271: no `int PTcl::cygwin32_connect(int, char **)' member function declared in class `PTcl' PTcl.cc: In method `int PTcl::cygwin32_connect(int, char **)': PTcl.cc:274: no matching function for call to `InterpGalaxy::cygwin32_connect (char *&, char *&, char *&, char *&, char *&)'Added
#undefine connect
to the line just before PTcl::connect
Building a shared libptcl fails
gcc: unrecognized option `-shared'See the Cygwin dll page for information about how to generate dlls. In the short term, I decided to just build a static pigi.
ld.exe
will not link with dlls. Also, cygwin ld.exe
ignores .lib
files, it looks for .a
files instead.
g++ -L../../lib.nt4 -Wl,-s ptclAppInit.o version.o -lptcl -lexttools \ -lptmatlab -lptmathematica -lptolemy c:/Itcl2.2/itcl/win/Itcl22.lib \ c:/Itcl2.2/tcl7.6/win/Tcl76i.lib -lg++ -lm -o ptcl.ptiny
c:/Itcl2.2/tcl7.6/win/Tcl76i.lib(Tcl76i.dll)(.idata$2+0x0): multiple definition of `idata$2' c:/Itcl2.2/itcl/win/Itcl22.lib(Itcl22.dll)(.idata$2+0x0): first defined here c:/Itcl2.2/tcl7.6/win/Tcl76i.lib(Tcl76i.dll)(.idata$2+0x0): multiple definition of `idata$4' c:/Itcl2.2/itcl/win/Itcl22.lib(Itcl22.dll)(.idata$2+0x0): first defined here c:/Itcl2.2/tcl7.6/win/Tcl76i.lib(Tcl76i.dll)(.idata$2+0x0): multiple definition of `idata$5' c:/Itcl2.2/itcl/win/Itcl22.lib(Itcl22.dll)(.idata$2+0x0): first defined here C:\cygnus\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-961023/libgcc.a (_trampoline.o): In function `mprotect': /pizza/mushroom/noer/beta17/src/gcc/libgcc2.c(.text+0x67): undefined reference to `VirtualProtect'I created a library called
TclItcl.dll
by combining the
tcl and itcl .obj files. I added the following to
tcl7.6/makefile.vc
ITCLTMPDIR = ..\..\itcl\win ITCLOBJS = \ $(ITCLTMPDIR)\itcl_bicmds.obj \ $(ITCLTMPDIR)\itcl_class.obj \ $(ITCLTMPDIR)\itcl_cmds.obj \ $(ITCLTMPDIR)\itcl_linkage.obj \ $(ITCLTMPDIR)\itcl_methods.obj \ $(ITCLTMPDIR)\itcl_objects.obj \ $(ITCLTMPDIR)\itcl_obsolete.obj \ $(ITCLTMPDIR)\itcl_parse.obj \ $(ITCLTMPDIR)\itcl_util.obj # $(ITCLTMPDIR)\dllEntryPoint.obj TCLITCLDLL=TclItcl.dll TCLITCLOBJS=$(TCLOBJS) $(ITCLOBJS) $(TMPDIR)\tclitclvc.def: $(DUMPEXTS) $(TCLITCLOBJS) $(DUMPEXTS) -o $@ $(TCLITCLDLL) @<< $(TCLITCLOBJS) << $(TCLITCLDLL): $(TMPDIR)\tclitclvc.def $(TCLITCLOBJS) set LIB=$(TOOLS32)\lib $(link32) $(linkdebug) $(dlllflags) -def:$(TMPDIR)\tclitclvc.def \ -out:$@ $(TMPDIR)\tcl.res $(guilibsdll) $(TCLITCLOBJS)Creating TclItcl.lib fixes some of the problems. The VirtualProtect problem I solved as follows:
/cygnus/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/libgcc.a
contains the undefined VirtualProtect:
libgcc.a:_trampoline.o:0000007c b .bss libgcc.a:_trampoline.o:0000007c d .data libgcc.a:_trampoline.o:0000007c ? .stab libgcc.a:_trampoline.o:00000418 ? .stabstr libgcc.a:_trampoline.o:00000000 t .text libgcc.a:_trampoline.o: U _VirtualProtect libgcc.a:_trampoline.o:00000000 t ___gnu_compiled_c libgcc.a:_trampoline.o:00000000 T _getpagesize libgcc.a:_trampoline.o:0000000c T _mprotect libgcc.a:_trampoline.o:00000000 t gcc2_compiled.The fix was to edit
Linker.cc
and comment out the
getpagesize()
call.
ptcl.ptiny
, but when I start it up I get a message
"The procedure entry point could not be located in the dynamic link library TclITcl.dll"
http://www.cygnus.com/misc/gnu-win32/faq.html
says
Can I mix objects compiled with msvc++ and gcc?The problem here is that tcl/tk is compiled using MS visual c++, and we need to have g++ set things up for our constructors. It could be that there is a bug in how I built the shared library, but it looks okYes, this supposedly works. The key seems to be using MS's LINK.EXE to do the linking instead of GNU ld. There may be issues with constructor calls for C++/Obj C.
I also attempted to use MS VC++, and had lots of problems:
.cc
extension, VC++
wants some other extension. I could not find a way to override this.
nmake
far
is a keyword in vc++, we would need to work around this.
far.c(1) : error C4226: nonstandard extension used : 'far' is an obsolete keyword far.c(1) : error C2059: syntax error : ')'
PtinyNT
, a small version of Ptolemy for NT.Ptiny
That consists of only SDF (without image stars) and DE. Ptiny0.5.2 was
not shipped with the intentions of allowing the user to write new stars.
If it does not make the package too much larger, I would like to see the binaries support matlab and mathematica.
Ptiny should be shipped as a very small tar file that consists of everything necessary to run.
vem
, and would ship
tysh.ptiny
instead of pigiRpc.ptiny
tycho
src/kernel
- We might be able to remove a number
of code generation files. Perhaps we should have a src/cgkernel
directory?
src/domains/sdf
, except
dfm,image,matrix,vis
targets?
src/domains/de
, except atm
.
There are probably more stars that can come out.
src/utils
, except
libgslider,ptvhdlsim,rman,tkman
src/pigilib
, along with whatever lib
files necessary to support vem
. Eventually
vem
will disappear.
lib/tcl
. What ever
(dis)functionality that is in lib/tcl
should be in
tycho.
lib
can be cleaned out.
tysh
or ptcl
. Under NT, we would ship
tysh.ptiny
and not ship pigiRpc.ptiny
.
pxgraph
, and
xv
, since NT does not have X.
src
will not be shipped:
compat,contrib,filters,ptcl,ptlang,pxgraph,thread,tst,tysh,vendors,xv
cgkernel
.
pxgraph
and xv