[gps-devel] Re: Builindg GPS on windows 2000...
Chris Douty
Chris_Douty at ampex.com
Sat Jul 2 01:40:56 CEST 2005
Hi Stephane,
Sorry for taking so long to get back to you. I hadn't even attempted
building GPS on Windows for quite a while, but just did so last night.
I am afraid that I don't have all of the answers in an easy form
right now because my development environment is very hacked
together. The particular problem you are seeing below is from a
syntax change in the C pre-processor or possibly a broken, untested
feature in MinGW's gcc port. Cygwin is not necessary, but it might
be easier.
Deep within GPS's maze of makefiles, you will find "gps/builder/src/
Makefile.generic". It defines the real commands used to compile C
sources, and how to maintain dependencies. The command echoed to the
screen is not the actual compilation command. I don't know why they
(AdaCore) chose to complicate this like that. On about line 298 you
should find the definition of DEP_CFLAGS. Change it to read:
DEP_CFLAGS = -MD -MF $(OBJ_DIR)/$(*F).pp
You will encounter other problems, but I am hesitant to say exactly
what. One this that is likely on Windows is the system bitching that
it can not recompile a-textio.adb once it finally starts building Ada
files. This is due to a timestamp mismatch between gnat_src/s-
crtl.ads and the compiler's internal library. I "fixed" that by
using touch -r to copy the timestamps from the adalib copy to the new
copy. I also had to hack about with the db library included with
source navigator. There was a configuration problem where Arno's fix
for Windows undefined types broke with later version of MinGW. I
also had to remove "-fwritable-strings" from the tcl8.1 Makefile
because my compiler simply does not support it.
Here's my environment:
Win XP SP2
mingw-runtime 3.7
w32api 3.2
bbinutils 2.15.94
MSYS 1.0.10
msysDtk 1.0.1
gcc 4.0.1 (prerelease 20050608) hacked to build. This required a SEH
patch of an origin I don't recall.
GtkAda from CVS -rgps-3_0-branch updated 20050630
XmlAda from CVS HEAD
gps from CVS -rgps-3_0-branch updated 20050630
gcc/ada source from mainline last updated 20050516 I think. Probably
should have updated these.
Gtk/glib from http://www.gimp.org/win32/
I didn't want to try building these huge number of dependencies
without nice tools like Darwin ports or rpm.
If you have a choice, stick with Gtk 2.4.x for a while. I used 2.6.8
and had to edit a bunch of bindings on Windows. I'm not sure that I
found all of them, because apparently the symbols aren't resolved
until an application tries to link with them. I should audit the Gtk/
Glib headers for all the places where they decided to rename
functions on windows via #define. For example "gdk_new_from_file"
becomes "gdk_new_from_file_utf8" on Windows.
In any case I did get the thing to build be sticking at it. So far
most things seem to work except that the "Emacs" theme is totally
hosed, and building C++ projects adds an unsupported "-d" option to
gprmake. If I am brave/bored I will try GPS mainline, although I'll
probably try working on Macc OS X 10.4 first.
Good luck,
Chris
On Apr 16, 2005, at 8:16 AM, stephane wrote:
> Hi Chris,
>
> I'm the maintainer of AIDE (Ada Instant Development Environment),
> see URL below. Planning for a completly new release, I wish to add
> some new features like cross platform target (Windows -> AVR-Atmel)
> and so, I had to rebuild GPS on windows 2000 with some patches
> around cross-platforms switchs...
>
> AIDE use to compile almost every software in Ada, including complex
> GtkAda software like TestGtk, or even GVD (the GPS precursor). I've
> never seen a software I can't built with it except one : GPS. Arno
> Charlet told me to use Cygwin. I don't like Cygwin, but I tried,
> without success at all.
>
> Usually, building Ada software is a pleasure. Unfortunatly, GPS
> doesn't fit in this perspective : the GPS build process is
> amazingly complex. I've succeeded to build cross-platform gcc
> compilers and debuggers and I can't succeed to build an Ada high
> level software : very disapointing.
>
> Browsing the low-traffic GPS dev mailing list archives from the
> begining, it seems you are the one who succeeded to build GPS on
> windows 2000, (however, with some problems).
>
> I use :
>
> MinGW-3.2.0-rc-3 (gcc 3.4.2)
> MSYS-1.0.10 (Make 3.79.1)
> msysDTK-1.0.1
>
> I got some strange messages at the very beginning (the first gcc
> call !)
>
> -------------------------------------------------------------------
> $ make
> make -s -C glide -f Makefile.gps default
> gcc -c -g -O2 -DSYSTEM_INCLUDE="system/windows.h" -DPACKAGE_NAME=""
> -DPACKAGE_TARNAME="" -DPACKAGE_VERSION="" -DPACKAGE_STRING="" -
> DPACKAGE_BUGREPORT="" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -
> DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -
> DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -
> DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SETPGID=1 -
> DHAVE_SETSID=1 /d/_gps/gvd/common/file-utils.c -o /d/_gps/gvd/
> common/obj/file-utils.o
> d:/_gps/gvd/common/file-utils.c:58: fatal error: opening dependency
> file /d/_gps/gvd/common/obj/file-utils.pp: No such file or directory
> compilation terminated.
> make[2]: *** [file-utils.o] Error 1
> make[1]: *** [compile_/d/_gps/glide/../gvd/gvd_common] Error 2
> make: *** [default] Error 2
> -------------------------------------------------------------------
>
> /d/_gps/gvd/common/obj/file-utils.pp: No such file or directory
> .pp ???
>
> I would like to know what is your working environment ?
>
> Thanks,
>
> Regards from France,
>
> --
> Stephane Riviere
> Oleron Island - France
> http://stephane.rochebrune.org
> OpenPgp Key <5fd6a1e6> available on the web site above
>
>
--
Christopher Douty <Chris_Douty at ampexdata.com> +1-650-367-3129
Senior Engineer, Software & Systems - AMPEX Data Systems Corp.
More information about the gps-devel
mailing list