gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] Autotools build system


From: David Fang
Subject: Re: [Gnucap-devel] Autotools build system
Date: Sun, 21 Jun 2009 04:41:02 -0400 (EDT)

On Sunday 21 June 2009, David Fang wrote:
        Would the user's experience feel any different if modules
were always built separately, but always loaded on startup?

If you think only of Linux, BSD, and similar systems, I agree.
Now consider MS-Windows, not on a network but perhaps a student
computer, or maybe it is on a network but doesn't have gnucap
installed.  One reason for having a version with a set of stuff
built-in (as it is now) is that a simple executable can be
useful.  As a former college professor, I see a need for this
for handing out to students.  I also see a need for it as a
"demo".

Al,

Knowing little about properly managing DLLs in windows, I agree that having a static executable is simple. You can either build such an executable in addition to the dynamically linked/loaded one (perhaps named differently?), or as a replacement (named the same).

To see what it is like, look at either Make1 or Makefile.am and
see the list of which ones would move.  You might even try a
build with all of them moved out.

Remove the lines:
$(D_SRCS) \
$(BM_SRCS) \
$(C_SRCS) \
$(S_SRCS) \
$(LANG_SRCS) \
$(FUNC_SRCS) \

If you are using the development build system, just type "make"
after doing this.  If you are running the autoconf build system
..  now you tell me what you have to do to make the change take
effect.

Same thing for Makefile.am; remove the same lines, clean the library, remake. If you've configured with --enable-maintainer-mode, make will regenerate and re-configure Makefiles for you, much more efficient than manually running autogen.sh. *** Commenting out AM_MAINTAINER_MODE in configure.ac results in always automatically regenerating maintainer files (always --enable-maintainer-mode), which is what I recommend.

When I run the newly built stripped-down gnucap, however, I get:

bad internal command: clear
terminate called after throwing an instance of 'Exception_Bad_Internal_Command'
Abort

Does that happen for you too? This might be independent of our build system. (This is tested on powerpc-apple-darwin8.)

Full info:
--------------------->8 snip 8<------------------
[fangism:gnucap-2009-06-11-patched/build/src] fang% ../libtool --mode=execute 
gdb ./gnucap
GNU gdb 6.3.50-20050815 (Apple version gdb-696) (Sat Oct 20 18:20:28 GMT 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...
warning: --arch option not supported in this gdb.
Reading symbols for shared libraries .
warning: UUID mismatch detected between:

/Users/fang/local/src/gnucap-2009-06-11-patched/build/src/.libs/libgnucap.0.0.0.dylib

/Users/fang/local/src/gnucap-2009-06-11-patched/build/src/.libs/libgnucap.0.0.0.dylib.dSYM/Contents/Resources/DWARF/libgnucap.0.0.0.dylib...
...... done

(gdb) run
Starting program: /Users/fang/local/src/gnucap-2009-06-11-patched/build/src/.libs/gnucap
Reading symbols for shared libraries .+ done
Gnucap 2009.06.11 RCS 26.111
The Gnu Circuit Analysis Package
Never trust any version less than 1.0
Copyright 1982-2007, Albert Davis
Gnucap comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome
to redistribute it under the terms of
the GNU General Public License, version 3 or later.
See the file "COPYING" for details.
bad internal command: clear
terminate called after throwing an instance of 'Exception_Bad_Internal_Command'

Program received signal SIGABRT, Aborted.
0x90047dac in kill ()
(gdb) where
#0  0x90047dac in kill ()
#1  0x9012d7b4 in abort ()
#2  0x94c8c078 in __gnu_cxx::__verbose_terminate_handler ()
#3  0x94c89c08 in __gxx_personality_v0 ()
#4  0x94c89c6c in std::terminate ()
#5  0x94c89eac in __cxa_throw ()
#6 0x0104b238 in CMD::command (address@hidden, scope=0xc24bc195) at ../../src/c__cmd.cc:118
#7  0x00004d3c in main (argc=1, argv=0xbfffdcec) at ../../src/main.cc:216

--------------------->8 snip 8<------------------

I can look into this further after some sleep.  :)


What you are left with is a program with only one command, the
one to load plugins.  You will need to do control-D to quit,
because even the quit command isn't there.

If a module is loaded by default, and you want to replace it,
all you need to do is load the one you want.

You can always add such an executable to Makefile.am:
if WIN32
bin_PROGRAMS += gnucap-win32-demo
endif
...

and link it statically.

I thought Makefile.am was supposed to not require that stuff.

Nothing is required, it just gives you the ability to do such things.


Fang

David Fang
http://www.csl.cornell.edu/~fang/
http://www.achronix.com/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]