Compile Giac on Mac OS X
Modérateur : xcasadmin
Re: Compile Giac on Mac OS X
You should not remove Cfg.o and so on. Could you copy/paste what you get from sh mkaout?
Re: Compile Giac on Mac OS X
When we run sudo sh mkaout, at first it says this:
So at the first line of mkaout we change g++-3.4 to g++-4.0 which we have installed on our system.
Then after running sudo sh mkaout again it returns this error:
Filio and Petros
Code : Tout sélectionner
mkaout: line 1: g++-3.4: command not found
Then after running sudo sh mkaout again it returns this error:
Code : Tout sélectionner
i686-apple-darwin9-g++-4.0.1: /usr/lib/libgmpxx.a: No such file or directory
Re: Compile Giac on Mac OS X
Then remove libgmpxx.a. Try again and remove libraries which are not on your system, but not object files.
Re: Compile Giac on Mac OS X
Ok we did as you said and ran sudo sh mkaout again. We didn't remove any .o files and it returns errors about Undefined symbols in the files:
Fl.o
gl2ps.o
Graph3d.o
Editeur.o
Flv_List.o
Flv_Table.o
Graph.o
and some other object files and not libraries...
What do you believe we are doing wrong?
Filio and Petros
Fl.o
gl2ps.o
Graph3d.o
Editeur.o
Flv_List.o
Flv_Table.o
Graph.o
and some other object files and not libraries...
What do you believe we are doing wrong?
Filio and Petros
Re: Compile Giac on Mac OS X
Can you send at least a part of the output, I need to know the names of the symbols which are not found to give you some hints.
Re: Compile Giac on Mac OS X
Check the attached .txt file please!
Filio and Petros
Filio and Petros
- Pièces jointes
-
- errors.txt.zip
- (25.66 Kio) Téléchargé 254 fois
Re: Compile Giac on Mac OS X
It seems you did not link against the fltk* libraries. If you compile xcas without graphic user interface (that is without FLTK), could you check that FLTK support is indeed disabled in config.h (both in the src directory and the upper directory)? Otherwise, you must keep the libfltk*.a in the mkstat shell-script, but you will perhaps have to modify the path if you did not install FLTK in the /usr/local subdirectories.
Re: Compile Giac on Mac OS X
We tried to disable fltk by setting to 0 in all the config.h and config.h.osx the flags below:
Since we changed the configure.h files we ran ./configure again with all the necessary exports and when we ran sudo sh mkaout It returned the errors shown in the attached file.
How do we continue?
Code : Tout sélectionner
/* Define to 1 if you have the `fltk' library (-lfltk). */
#define HAVE_LIBFLTK 0
/* Define to 1 if you have the `fltk_gl' library (-lfltk_gl). */
#define HAVE_LIBFLTK_GL 0
/* Define to 1 if you have the `fltk_images' library (-lfltk_images). */
#define HAVE_LIBFLTK_IMAGES 0
/* Now defined if fltk is available */
#define HAVE_LIBFLVW 0
How do we continue?
- Pièces jointes
-
- errors.txt.zip
- (25.79 Kio) Téléchargé 246 fois
Re: Compile Giac on Mac OS X
You should not define them as 0, but comment the line, like this:
/* #define HAVE_LIBFLTK 0 */
Then make clean and make. Then sh mkstat (with libfltk* removed). Then you should have an icas application that works only from the terminal.
After that, you can try to compile FLTK...
/* #define HAVE_LIBFLTK 0 */
Then make clean and make. Then sh mkstat (with libfltk* removed). Then you should have an icas application that works only from the terminal.
After that, you can try to compile FLTK...
Re: Compile Giac on Mac OS X
We did as you said. When we execute sudo make it returns:
Then we execute sudo sh mkstat after we remove fltk libraries from within it. It returns these errors:
Filio and Petros
Code : Tout sélectionner
Undefined symbols:
"_libintl_gettext", referenced from:
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::check_local_assign(giac::gen const&, giac::context const*)in libgiac.a(prog.o)
giac::symb_program_sto(giac::gen const&, giac::gen const&, giac::gen const&, giac::gen const&, bool, giac::context const*)in libgiac.a(prog.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Code : Tout sélectionner
Undefined symbols:
"_add_history", referenced from:
rl_gets(int) in icas.o
"_using_history", referenced from:
_main in icas.o
"_readline", referenced from:
rl_gets(int) in icas.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
strip: can't open file: icas (No such file or directory)
Re: Compile Giac on Mac OS X
You must find where libreadline and libhistory are located on your system, perhaps in /usr/lib, or you must comment READLINE defines in config.h.
Re: Compile Giac on Mac OS X
Hello,
We removed all the references of READLINE from the config.h files, ran sudo make clean, sudo make. Afterwards we ran sudo sh mkstat and it didn't return any errors. sudo sh mkaout though returned these errors:
We tried to link lintl library by including -lintl in mkaout but it doesn't pass, it returns
What can we do about this?
Filio and Petros
We removed all the references of READLINE from the config.h files, ran sudo make clean, sudo make. Afterwards we ran sudo sh mkstat and it didn't return any errors. sudo sh mkaout though returned these errors:
Code : Tout sélectionner
Undefined symbols:
"_libintl_gettext", referenced from:
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::check_local_assign(giac::gen const&, giac::context const*)in prog.o
giac::symb_program_sto(giac::gen const&, giac::gen const&, giac::gen const&, giac::gen const&, bool, giac::context const*)in prog.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Code : Tout sélectionner
ld: library not found for -lintl
collect2: ld returned 1 exit status
Filio and Petros
Re: Compile Giac on Mac OS X
Oops sorry, you don't have to run sh mkaout (that is the shell script I'm running under linux). If sh mkstat ran without error, then you are done with the commandline version of giac, you should be able to type
./icas
and the program should run, you can try a few commands like 1+1 or factor(x^4-1) to see if it works.
If it works, you can try to compile additional libraries, starting with FLTK to have a graphical interface (but this one is probably not easy to compile) or readline to have some decent commandline interface in the terminal, then maths libraries, MPFR and gsl are probably the easiest ones.
./icas
and the program should run, you can try a few commands like 1+1 or factor(x^4-1) to see if it works.
If it works, you can try to compile additional libraries, starting with FLTK to have a graphical interface (but this one is probably not easy to compile) or readline to have some decent commandline interface in the terminal, then maths libraries, MPFR and gsl are probably the easiest ones.
Re: Compile Giac on Mac OS X
Ok, icas did run and we managed to use it in the terminal only like this:
Let's say now we want to use some functions in an iphone app. Do you know how we can import giac library now? We didn't run sudo make install so the library wasn't installed in our system, right? We can't just add include <giac.h> in our code, can we?
Filio and Petros
Code : Tout sélectionner
noname:src filioui$ ./icas 5^2
Help file aide_cas not found
// Unable to find keyword file doc/en/keywords
Help file doc/en/aide_cas not found
Added 0 synonyms
25
Filio and Petros
Re: Compile Giac on Mac OS X
Running giac in an iphone app is quite different than on the mac, you can not use the compiled object files for the mac on the iphone. If I'm correct, you must cross-compile for the ARM processor of the iphone and you must build a user interface (UI) for the iphone using the API of the iphone. You can use #include <giac/giac.h> or (#include giac headers one by one) in your UI source code, then you will have to build the iphone executable linking to all the ARM object files compiled from the giac source files. You must also have cross-compiled the required libraries (i.e. GMP at least). However, I don't know how to do that precisely, you must learn how to use the iphone devkit.