Hi dear All. I'm trying to build some pascal program for ARM7TDMI using GPC as a cross compiler for ARM (host - i686, RedHat9; target - uclinux, ARM7TDMI, gcc - 2.95.3, gpc - 20010315). I've got some problems, could you please help me with those:
1. When I include unit CRT in my program, GPC asks for libos-hack library that I don't have on my machine. After some investigation I found that I can change file rts-config.inc (i.e. write there string #UNDEF HAVE_LIBOS_HACKS) to avoid this issue. Is it any bug in GPC configuration script? Is it just enough to change this string for system to work correctly? I didn't manage to find any notes about libos-hack in Google.
2. After I have removed this issue about libos-hack, arm-elf-gpc asked for libpanel library from ncurses but cannot find it. How should I correct this problem? I read configuration scripts for ncurses and found that they use only usual gcc, there is nothing like $(target)-gcc in the scripts. Is it possible to build and install ncurses for ARM? I think I cannot use library /usr/lib/libpanel.a for ARM if it is compiled using usual gcc for Intel. Is it possible to install ncurses so that only source files will be used (i.e. without libraries)? Or is it possible to build ncurses for arm using arm-elf-gcc?
Thanks a lot, Igor Marnat. mailto:marny@rambler.ru
Igor Marnat wrote:
- When I include unit CRT in my program, GPC asks for libos-hack library
that I don't have on my machine. After some investigation I found that I can change file rts-config.inc (i.e. write there string #UNDEF HAVE_LIBOS_HACKS) to avoid this issue. Is it any bug in GPC configuration script?
Probably. If you want to investigate yourself, .../p/rts/configure.in is the autoconf source, and .../p/rts/configure the generated shell script that checks for (and apparently wrongly found) libos-hacks (among other things).
Is it just enough to change this string for system to work correctly?
Yes.
I didn't manage to find any notes about libos-hack in Google.
You might find something searching the mailing list archives on the GPC homepage. Anyway, there's nothing magic about it. It can be just any library with local amendments that is linked automatically when it exists at build time (e.g., to supply missing or override bogus library functions). You probably don't need any.
- After I have removed this issue about libos-hack, arm-elf-gpc asked for
libpanel library from ncurses but cannot find it. How should I correct this problem?
Well, ncurses includes this library. Maybe try reinstalling ncurses?
I read configuration scripts for ncurses and found that they use only usual gcc, there is nothing like $(target)-gcc in the scripts. Is it possible to build and install ncurses for ARM? I think I cannot use library /usr/lib/libpanel.a for ARM if it is compiled using usual gcc for Intel. Is it possible to install ncurses so that only source files will be used (i.e. without libraries)? Or is it possible to build ncurses for arm using arm-elf-gcc?
Ah, you don't have ncurses installed for ARM at all.
Well, I don't know ARM, so I don't know if ncurses supports it, but probably the docs will tell. If so: cross-compiling ncurses is not too well supported (last time I checked). I think you have to set CC to arm-elf-gcc and perhaps some other variables. I once did it for other platforms, but I don't remember exactly all the steps necessary. I suggest you try it step by step and take notes, or ask on the curses mailing list (bug-ncurses@gnu.org).
(Looking briefly, I seems ARM is supported since there were at least some error reports about it. :-) But I don't have the time to read it all, you might want to check the ncurses list archives.)
Frank
Hello Frank and All!
Frank, thanks for your answer, program was successfully compiled without libos-hack. I also have managed to build ncurses for ARM and run some of its test programs under ARM - it seems to be functional. It takes a little of time and some corrections of makefiles - I cannot tell that there are all clear for me with configuration variables and scripts, it seems to be some problems in this area. Anyway it works now. Now I have another problem - libgrx20. Is it possible to build it for ARM? There is written in documentation that only a few platforms are supported and it needs a good understanding of GRX internals to build it for another platform (which I don't actually have, this good understanding). Is it some other graphic interface besides libgrx? I need some interface like those that is realized in Midnight Commander - nothing extraordinary. It works fine under Linux on i686 using libgrx20 but I don't think that it will be easy to build libgrx20 under ARM (especially taking in consideration that it uses svgalib). Have anybody some experience in the field?
Best regards, Igor Marnat mailto:marny@rambler.ru
Igor Marnat wrote:
Frank, thanks for your answer, program was successfully compiled without libos-hack. I also have managed to build ncurses for ARM and run some of its test programs under ARM - it seems to be functional. It takes a little of time and some corrections of makefiles - I cannot tell that there are all clear for me with configuration variables and scripts, it seems to be some problems in this area. Anyway it works now.
I suppose so. (As I said, you might want to report what you did on the ncurses list and perhaps you'll get some feedback from there.)
Now I have another problem - libgrx20. Is it possible to build it for ARM? There is written in documentation that only a few platforms are supported and it needs a good understanding of GRX internals to build it for another platform (which I don't actually have, this good understanding).
One of the GRX targets is Unix X11. That's the only one that can possibly run on ARM AFAICI -- provided you have X11 running. (If not you'd have to port GRX yourself, which is probably a lot of work.) If building for the X11 target doesn't work as usual (well, you probably have to use variables for the cross-compiler as for ncurses ...), the GRX list is grx@gnu.de.
Is it some other graphic interface besides libgrx? I need some interface like those that is realized in Midnight Commander - nothing extraordinary. It works fine under Linux on i686 using libgrx20 but I don't think that it will be easy to build libgrx20 under ARM (especially taking in consideration that it uses svgalib).
Forget about svgalib. It is (was?) a kludge under Linux and works nowhere else AFAIK.
If you have X11, you can try GRX, plain xlib (see contrib/eike for a Pascal interface) and probably a number of other libraries (usually without Pascal interface, but that's relatively easy to write if you don't need very many routines and declarations).
Frank