Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I meet a question when I practice adding a new metric. #19

Open
Dirac666666 opened this issue Jun 18, 2024 · 4 comments
Open

I meet a question when I practice adding a new metric. #19

Dirac666666 opened this issue Jun 18, 2024 · 4 comments

Comments

@Dirac666666
Copy link

Dear author
I meet a question when I practice adding a new metric.
I rename source file that named KerrBL.c to Kerr.c file, and I replace "KerrBL" with "Kerr" in Kerr.c file and files that are associated with Kerr.c file.
the associated files are placed in null/lib and null/include. and I proceed as follows:

1- choose a cool name;
2- copy this directory (plugins/null/) somewhere;
3- edit configure.ac, lib/Makefile.am and lib/InitPlug.C: replace any
occurrence of "null" with your cool name;
4- add new metrics and astrobjs as needed in lib/ and include/, the
gyoto source code is also full of examples;
5- edit lib/InitPlug.C to register your new classes (rename it to
CoolPlug.C if you wish);
6- add the name of the required C++ source files to the
libgyoto_null_la_SOURCES variable in lib/Makefile.am (this variable
should have been renamed to libgyoto__la_SOURCES by
now);
7- run autoreconf (whenever you edit any configure.ac or Makefile.am
file), then ./configure, make, make install...
8- if installing to default directories (/usr/local/lib), you may need
to run 'sudo ldconfig'

and the question is as follows:
$ gyoto 0.xml !test

WARNING: unable to load optional plug-in libgyoto-lorene.so
Reading parameter file: 0.xml
In gyoto.C: Error in Factory creation: Factory.C:189 in virtual void Gyoto::DOMErrorReporter::fatalError(const xercesc_3_2::SAXParseException&): expected end of tag 'Scenery'

0 xml.txt
configure ac.txt
GyotoKerr h.txt
InitPlug C.txt
Kerr C.txt
Makefile am.txt

@Dirac666666
Copy link
Author

Dirac666666 commented Jun 18, 2024

And I have another problem.When I run autoreconf ,terminal said the autoconf version could not be lower than 2.71,so I installed it.But i find that i can't run make in /Gyoto,it says:
cd . && /bin/bash /home/vboxuser/下载/Gyoto-master/missing automake-1.16 --foreign
/home/vboxuser/下载/Gyoto-master/missing: line 81: automake-1.16: command not found
WARNING: 'automake-1.16' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
https://www.gnu.org/software/automake
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
https://www.gnu.org/software/autoconf
https://www.gnu.org/software/m4/
https://www.perl.org/
Makefile:442: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1

@paumard
Copy link
Member

paumard commented Jun 25, 2024

Hi, concerning your first issue, you need to remove the "/" symbol on the third line of 0.xml.txt: it should read
<Metric plugin="test" kind="Kerr">

@paumard
Copy link
Member

paumard commented Jun 25, 2024

Concerning your second problem : you said that you installed autoconf 2.71, but did you run it afterwards ?

@Dirac666666
Copy link
Author

Dirac666666 commented Jul 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants