From: Holger V. <hol...@un...> - 2008-09-14 08:36:42
|
Hi all, I guess that the issue may be solved by modifying /src/makefile.am. When I configure ngspice without the --with-tcl flag, I get the following compilation protocol: /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices -O2 -Wall -s -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c -o cktfnode.lo cktfnode.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices -O2 -Wall -s -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c cktfnode.c -DDLL_EXPORT -DPIC -o .libs/cktfnode.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices -O2 -Wall -s -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c cktfnode.c -o cktfnode.o >/dev/null 2>&1 mv -f .deps/cktfnode.Tpo .deps/cktfnode.Plo These protocol looks similar to the sample protocol from the autobook example, which I ran and which creates a dll. /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.lo -MD -MP -MF .deps/hello.Tpo -c -o hello.lo hello.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.lo -MD -MP -MF .deps/hello.Tpo -c hello.c -DDLL_EXPORT -DPIC -o .libs/hello.o libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.lo -MD -MP -MF .deps/hello.Tpo -c hello.c -o hello.o >/dev/null 2>&1 mv -f .deps/hello.Tpo .deps/hello.Plo In /src a ngspice.exe is made with 15k size. When I click on it, ngspice pops up???!!! In fact, in /src/.libs I find the full ngspice.exe excutable, which runs on itself, but may also be called by src/ngspice.exe. If I configure with --with-tcl, I get the (excerpt) protocol: /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices -I/mingw/include -O2 -Wall -s -I/mingw/include -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c -o cktfnode.lo cktfnode.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices -I/mingw/include -O2 -Wall -s -I/mingw/include -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c cktfnode.c -o cktfnode.o mv -f .deps/cktfnode.Tpo .deps/cktfnode.Plo The line with compilation using the flags -DDLL_EXPORT -DPIC is missing, which may be the error source, resulting in the message reported below. Regards Holger Holger Vogt schrieb: > Hi Lionel, > > not yet successful, getting this error message: > > /bin/sh ../libtool --tag=CC --mode=link gcc -g -O0 -Wall > -I/mingw/include -mwindows -shared -Wl,--version-script=tclspice.map > -no-undefined -o libspice.la -rpath C:/Spice/lib ngspice.lo conf.lo > spice.lo frontend/libfte.la frontend/wdisp/libwindisp.la > frontend/plotting/libplotting.la > ... > maths/sparse/libsparse.la misc/libmisc.la tclspice.lo -lm -liberty > -lpsapi -lm -liberty -lpsapi > libtool: link: can not build a shared library > libtool: link: See the libtool documentation for more information. > libtool: link: Fatal configuration error. > > A static library will build. > > Regards > > Holger > |
From: Lionel S. C. <lio...@gm...> - 2008-09-15 06:54:06
|
Hi holger Can you have a look at config.log, and look for strings containing DLL or dll? Perhaps you can find some information on why the -DDLL_EXPORT -DPIC are missing. Do you use the --with-windows flag at configure time? If modify Makefile.am this way: libspice_la_LDFLAGS = -shared -Wl,--version-script=tclspice.map if WINDOWS libspice_la_LDFLAGS += -no-undefined endif Because for the moment -no-undefined has the side effect of failing while compiling xspice. So it has to be set only for windows build. 2008/9/14 Holger Vogt <hol...@un...>: > Hi all, > > I guess that the issue may be solved by modifying /src/makefile.am. > > When I configure ngspice without the --with-tcl flag, I get the > following compilation protocol: > > /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H > -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices > -O2 -Wall -s -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c > -o cktfnode.lo cktfnode.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. > -I../../../src/include -I../../../src/spicelib/devices -O2 -Wall -s > -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c cktfnode.c > -DDLL_EXPORT -DPIC -o .libs/cktfnode.o > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. > -I../../../src/include -I../../../src/spicelib/devices -O2 -Wall -s > -mwindows -MT cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c cktfnode.c > -o cktfnode.o >/dev/null 2>&1 > mv -f .deps/cktfnode.Tpo .deps/cktfnode.Plo > > These protocol looks similar to the sample protocol from the autobook > example, which I ran and which creates a dll. > > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -g -O2 -MT hello.lo -MD -MP -MF .deps/hello.Tpo -c -o hello.lo hello.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.lo -MD -MP > -MF .deps/hello.Tpo -c hello.c -DDLL_EXPORT -DPIC -o .libs/hello.o > libtool: compile: gcc -DHAVE_CONFIG_H -I. -g -O2 -MT hello.lo -MD -MP > -MF .deps/hello.Tpo -c hello.c -o hello.o >/dev/null 2>&1 > mv -f .deps/hello.Tpo .deps/hello.Plo > > In /src a ngspice.exe is made with 15k size. When I click on it, ngspice > pops up???!!! In fact, in /src/.libs I find the full ngspice.exe > excutable, which runs on itself, but may also be called by src/ngspice.exe. > > If I configure with --with-tcl, I get the (excerpt) protocol: > > /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H > -I. -I../../.. -I../../../src/include -I../../../src/spicelib/devices > -I/mingw/include -O2 -Wall -s -I/mingw/include -mwindows -MT > cktfnode.lo -MD -MP -MF .deps/cktfnode.Tpo -c -o cktfnode.lo cktfnode.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. > -I../../../src/include -I../../../src/spicelib/devices -I/mingw/include > -O2 -Wall -s -I/mingw/include -mwindows -MT cktfnode.lo -MD -MP -MF > .deps/cktfnode.Tpo -c cktfnode.c -o cktfnode.o > mv -f .deps/cktfnode.Tpo .deps/cktfnode.Plo > > The line with compilation using the flags -DDLL_EXPORT -DPIC is missing, > which may be the error source, resulting in the message reported below. > > Regards > > Holger > > > > > Holger Vogt schrieb: >> Hi Lionel, >> >> not yet successful, getting this error message: >> >> /bin/sh ../libtool --tag=CC --mode=link gcc -g -O0 -Wall >> -I/mingw/include -mwindows -shared -Wl,--version-script=tclspice.map >> -no-undefined -o libspice.la -rpath C:/Spice/lib ngspice.lo conf.lo >> spice.lo frontend/libfte.la frontend/wdisp/libwindisp.la >> frontend/plotting/libplotting.la >> ... >> maths/sparse/libsparse.la misc/libmisc.la tclspice.lo -lm -liberty >> -lpsapi -lm -liberty -lpsapi >> libtool: link: can not build a shared library >> libtool: link: See the libtool documentation for more information. >> libtool: link: Fatal configuration error. >> >> A static library will build. >> >> Regards >> >> Holger >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ngspice-devel mailing list > Ngs...@li... > https://lists.sourceforge.net/lists/listinfo/ngspice-devel > -- Lionel SAINTE CLUQUE |
From: Holger V. <hol...@un...> - 2008-09-23 23:03:17
|
Hi all, the installation instruction given in my last email was not complete. After a make maintainer-clean autogen.sh $ ./configure --with-windows --enable-maintainer-mode --enable-xspice --enable-cider --disable-debug xspice (especially cmpp.exe) was not made due to a lack of flex and yacc. flex and yacc have been installed into msys/1.0/bin from http://sourceforge.net/project/showfiles.php?group_id=23617 However: ifs_lex.c has been created, but only as an empty file! #define yyin ifs_yyin should be defined there, so an error message occured.. yacc seems to be not working. Removed yacc.exe by yacc.exe renamed to yacc.exe_ added bison.exe (plus dlls) and yacc from http://sourceforge.net/project/showfiles.php?group_id=23617&package_id=22822&release_id=372163 http://downloads.sourceforge.net/gnuwin32/bison-2.1-bin.zip?modtime=1132421651&big_mirror=1 Now after a make make install everthing was created including xspice. Regards Holger Holger Vogt schrieb: > > Paolo, > > > > meanwhile I have set up a fresh mingw which runs and currently builds > > ngspice! > > > > I have been following exactly (step by step, an ugly procedure of you > > are used to Windows installers) the advice given in > > http://www.mingw.org/wiki/msys . > > > > ... |
From: Holger V. <hol...@un...> - 2008-09-27 17:37:38
|
Lionel, for now I have given up making tclspice.dll with mingw. A specialist of autotools and libtool would be required to provide a proper setup for compilation and linking. Instead I have generated tclspice.dll with MC VC++ 2008. The dll is exporting a single function Spice_init. Only small changes to the actual CVS source code are required, which I would check in if the dll is working properly. However, due to my total lack of know-how with tcl-tk I would like to get some advice how to start ngspice using tclspice.dll. Just using $ wish84 % package require spice will result in the error message "can't fnd package spice". I guess that firstly I have to create such a package. Please give some advice. Regards Holger SAINTE CLUQUE Lionel schrieb: > Hi holger, > > First I would like to thank you, because at that time I'm 100% loaded by > work (and I start to be late). Then I can not progress on tclspice. So I > greatly appreciate your help on that topic. tclspice for windows is in > my hot-tasks list. > > Do you succeed in building a dll? > > Are you sure xspice will be able to link with the dll? I don't know the > topic well, but in a dll all dependencies have to be resolved at link > time. A dll can not load dynamic objects (as far as I undestand). For > the moment if I use the -z,defs link option xspice fails. > > thanks > > |
From: Lionel S. C. <lio...@gm...> - 2008-09-27 18:59:16
|
Hi holger I'm VERY glad to listen to that! 1) can you please have a look at http://ngspice.sourceforge.net/tclusers.html ? I quote the interesting text for you here: *Installation Directory As you may know tclspice consists in a library which is an executable shared object. You will see in the next section that you can either call it by providing a TCL interpreter the library absolute path, or simply by providing the library package name. Running tclspice by its absolute path does not require it to be placed in a special place. Runing it by its package name requires a package description file to be placed in a predefined directory. This is automatically done by the configure script. The configure script find an acceptable place for the library, and another acceptable place for the configuration files, by reading tclConfig.sh file. If you don't provide any target directory, runing make install will enable you to open you tcl interpreter and load spice package automatically. If you want the library to be installed in another directory, you can proceed two ways: * Copy the libspice.so.* files by hand. (Typically in src/.libs/ If it is not there, use find command to locate it). * Provide the install script with your custom installation path, using spicelibdir environement variable. In the example below, notice that there is NO -- before spicelibdir: ./configure spicelibdir=/whereever/you/want --with-tcl run make, run make installe with the required privileges. When running make install, the installation process will try to install a package descriptor in an acceptable directory. The consequence is that you can still run spice package from a tcl interpreter by its package name. The drawback is that you can have the installation process failing if you try to install it without root privileges. As you can see this is still under developpement. If you get errors, please, inform me. * 2) The package descriptor file is not covered by tclspice user manual. I'll give you some more information: this file is called pkgConfig.tcl On my computer tcl interpreters look in /usr/lib/tcltk for package descriptors pkgIndex.tcl it is created by runing make in ng-spice-rework/src directory on the line: pkgIndex.tcl: pkgIndex.tcl.in rm -f $@ sed -e 's;%LIB_DIR%;$(libdir);g' $< | \ sed -e 's;%VERSION%;$(TCLSPICE_VERSION);g' > $@ On my computer a directory called spice is created under /usr/lib/tcltk/ In /usr/lib/tcltk/spice/ pkgIndex.tcl is installed. Xspice code models are installed in this directory too. 3) To test the libspice.dll file, please use the tests available under ng-spice-rework/tests/tlc-testbench* You will have to edit these files to reflect the exact path and name of tclspice library. The files you will have to modify are tcl-testbench*.tcl: load ../../src/.libs/libspice.so becomes (if the path is still the same) : load ../../src/.libs/libspice.dll to run the test 1, cd to the ng-spice-rework/tests/tlc-testbench1 It is important to go in this directory, because all paths are relative to the directory you call the script from. run ./tcl-testbench1.tcl this will execute the test. If you get something like the screenshots of http://ngspice.sourceforge.net/tclexamples.html then, you're done! The same apply to other testbenches. I hope all is clearly explained. If you are in doubt, please ask me for more information. Good luck and thanks Lionel 2008/9/27 Holger Vogt <hol...@un...>: > Lionel, > > for now I have given up making tclspice.dll with mingw. A specialist of > autotools and libtool would be required to provide a proper setup for > compilation and linking. > > Instead I have generated tclspice.dll with MC VC++ 2008. The dll is > exporting a single function Spice_init. Only small changes to the actual > CVS source code are required, which I would check in if the dll is > working properly. > > However, due to my total lack of know-how with tcl-tk I would like to > get some advice how to start ngspice using tclspice.dll. > > Just using > > $ wish84 > % package require spice > > will result in the error message "can't fnd package spice". I guess that > firstly I have to create such a package. > > Please give some advice. > > Regards > > Holger > > > > > > SAINTE CLUQUE Lionel schrieb: >> Hi holger, >> >> First I would like to thank you, because at that time I'm 100% loaded by >> work (and I start to be late). Then I can not progress on tclspice. So I >> greatly appreciate your help on that topic. tclspice for windows is in >> my hot-tasks list. >> >> Do you succeed in building a dll? >> >> Are you sure xspice will be able to link with the dll? I don't know the >> topic well, but in a dll all dependencies have to be resolved at link >> time. A dll can not load dynamic objects (as far as I undestand). For >> the moment if I use the -z,defs link option xspice fails. >> >> thanks >> >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ngspice-devel mailing list > Ngs...@li... > https://lists.sourceforge.net/lists/listinfo/ngspice-devel > -- Lionel SAINTE CLUQUE |
From: <th...@mi...> - 2008-09-27 19:31:04
|
Hello Holger, load "libspice.dll" would be enough. Regards, Stephan |