Re: Problem attaching models

Rubén Gómez Antolí <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.general
Message-ID <[email protected]>
Hello Al,

al davis wrote:
> On Tuesday 11 March 2008, Rubén Gómez Antolí wrote:
>> Hello all,
>>
>> I have a question and a problem around attach model.
> 
> There are some known bugs.
> 
> Plugin attachment is not in its final form.  It will change
> before the stable release.  There is some question of 
> how it should work.  Your comments will be helpful.

Ok, I'll think about, when I have anything to say about I'll do.

In this moment I think that plugin method is interesting, a flexible
method of work with models and for attaching new commands (I read lasts
threads on this list, really educational).

>> * The question:
>>
>> If I untar models tarball after compile gnucap and compile &
>> install, are these models installed in my system before that?
> 
> No.  Plugins are usually built after gnucap is compiled and 
> installed.  Plugins require access to the gnucap header files.  
> Eventually, the header files will be installed somewhere 
> when gnucap is installed.  Eventually, you will be able at 
> "attach" the source files without manually compiling first.
>

Sorry, language issue here, untar models tarball before and installed after.

> Plugins are distributed separately, so they can be added later.  
> If you are on a shared system, this allows gnucap to be installed 
> for everyone to use, and plugins to be in your own space.

There was my question, I think that after install gnucap+plugins,
plugins should be accesible; under /usr/local/anything?

> [...]
>> gnucap> attach asrc.so
>> attach asrc.so
>>        ^ ? asrc.so: cannot open shared object file: No such file or directory
> 
> With no / it searches in the lib path.  If you want it there, 
> you need to manually put it there.
> 

Should be the result of a "make install"? (Plugins installed under lib path)

Is easy write a circuit with "attach asrc.so" and distribute it,
difficult to write a circuit with "attach /path/to/asrc.so" and
distribute, do not?

> 
>> gnucap> attach ./asrc.so
>> attach ./asrc.so
>>        ^ ? ./asrc.so: failed to map segment from shared
>> object: Operation not permitted
> 
> I don't know what that means.  I never saw that message.
> Here's a guess:  Maybe the plugin is compiled for a different
> architecture than the main program.  Maybe the compiler
> switches are different.  Let me know if you can figure it out.
> 

I'm not a programmer but I revised Make2 and Makefile (for Gnucap) and
not find any susceptible differences with flags.

Gnucap and models are compiled at same time with configure+make under
PowerPc.

I try other model:

gnucap> attach ./res.so
attach ./res.so
       ^ ? ./res.so: failed to map segment from shared object: Operation
not permitted

Make and gcc version:

azer@mac-lobo:~/Practicas_2008/Practica_2/Circuitos/Campo_de_pruebas$
make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
Este es software libre; consulte en el código fuente las condiciones de
copia.
NO hay garantía; ni siquiera para MERCANTIBILIDAD o EL CUMPLIMIENTO DE
ALGÚN PROPÓSITO PARTICULAR.

 Este programa fue construido para powerpc-unknown-linux-gnu
razer@mac-lobo:~/Practicas_2008/Practica_2/Circuitos/Campo_de_pruebas$
gcc --version
gcc (GCC) 4.2.3 (Debian 4.2.3-2)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



I try under my other machine:


razer@guarida:~/Fuentes/gnucap-2008-02-11$ ll models-ngspice17/res/res.so
-rwxr-xr-x 1 razer razer 646K Mar 11 22:21 models-ngspice17/res/res.so
razer@guarida:~/Fuentes/gnucap-2008-02-11$ gnucap
Gnucap 2008.02.10 RCS 26.71
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.
gnucap> attach ./models-ngspice17/res/res.so
R: already installed, replacing
stashing as R:0
gnucap> .get prueba.ckt
 LINEAL - PRUEBA DE CONCEPTO
 BINT 0 2 I=1+V(1)
 ^ ? B: no match
 BVCO 3 0 V=5*SIN(2*PI*10*V(2))
 ^ ? B: no match
RIN: can't find: 1
gnucap> quit

It attach well.

>> And, I don't know why "get" command don't run:
>>
>> gnucap> get Fuente_no_lineal_Gnucap.ckt
>> get Fuente_no_lineal_Gnucap.ckt
>> ^ ? what's this?
> 
> Try ".get" .. or change it as suggesed in my other mail.
> 

Ok, you can see now it above ;^D

>> Kernel: Linux 2.6.21-1-powerpc
> 
> That may be the problem.  I have not tested it there.
> 

Well, here are the tester  ^_^  . In other apps I have encounter issues
respect little and big endian, should be something related?

More test to do?


Thanks too much Al.

Salud y Revolución.

Lobo.

Pd.:I hope that language issues don't disturb this mail again, sorry
again for my very bad english.
-- 
Libertad es poder elegir en cualquier momento. Ahora yo elijo GNU/Linux,
para no atar mis manos con las cadenas del soft propietario.
---------
Desde El Ejido, en Almería, usuario registrado Linux #294013
http://www.counter.li.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.