On 2013-12-09 20:05-0000 Arjen Markus wrote:

> Hi Alan,
>
>> -----Original Message-----
>> From: Arjen Markus [mailto:arjen.mar...@deltares.nl]
>>
>> Then I ran into a compile error with a type TCHAR. I remember having similar 
>> trouble
>> before. This is something peculiar to Cygwin, I am afraid. I will leave this 
>> for the
>> moment and see what other things pop up with other targets.
>>
>
> I tried the following targets:
>
> - build_swig: this worked fine (implied build_libprce, so that is fine too)

I am very pleased to hear that since it shows the basic CMake logic and
dependency checking in epa_build is being done correctly on the Cygwin
platform.

> - build_pkg-config: problem in gutils.c because glib_dll is not declared. 
> Probable cause: we need to define a macro G_OS_WIN32,
>  as the identifier is conditionally defined in glib-init.h.

You can add a platform-specific macro in epa_build as follows:

In pkg-config/CMakeLists.txt you will see a series of platform-specific
logic blocks:

if(MSYS_PLATFORM)
   # configure (for glib subpackage) dies without this.
   set(CFLAGS "-march=native $ENV{CFLAGS}")
   # These changes cause improved test results (three failures rather than 4)
   # on Wine, see <https://bugs.freedesktop.org/show_bug.cgi?id=66939>
   set(BUILD_IN_SOURCE 1)
   set(BUILD_COMMAND ${EPA_MAKE_COMMAND})
else(MSYS_PLATFORM)
   set(CFLAGS "$ENV{CFLAGS}")
   # No changes from defaults required to get perfect test results
   # on Linux.
   set(BUILD_IN_SOURCE 0)
   set(BUILD_COMMAND ${EPA_PARALLEL_MAKE_COMMAND})
endif(MSYS_PLATFORM)

So just add another platform stanza before the else with everything
except CFLAGS done as for Linux (to start at least):

elseif(CYGWIN)
   set(CFLAGS "G_OS_WIN32 -D$ENV{CFLAGS}")
   # No changes from defaults required to get perfect test results
   # on Cygwin?
   set(BUILD_IN_SOURCE 0)
   set(BUILD_COMMAND ${EPA_PARALLEL_MAKE_COMMAND})

I hope that works because pkg-config is pretty important for PLplot.

> - build_cmake: an undefined reference to "cygwin_conv_to_win32_path"
during the link step.

That's strange.  I thought cmake just built out of the box on Cygwin.
This should be followed up but as a low priority since it isn't
a showstopper.

> As the others are Tcl/Tk-related or have some special purpose (edit_cache for 
> instance), I did not try them.

Do you know enough about Cygwin so you can dissect how the packages are
built?  That (or a post to one of the Cygwin experts you know) might
be able to help you figure out how to build tcl by hand, and
then once you have had success with that, it should be trivial
to do the same thing with epa_build using a small modification
of tcl/CMakeLists.txt.


However, figuring that out will take time so for now here is what
I suggest you do.


1) Get the above fixup to work for pkg-config

2) Try the default -DBUILD_THE_BUILDTOOLS=OFF case. For that case if
you have edited and used setup/setup_cygwin properly, you will end up
using your successful buildtool results for swig and pkg-config.
However, for every other buildtool (cmake and all the tcl/tk stuff)
where you are currently stopped from building the tool yourself, you
will end up using the system versions of those instead which is
a good temporary workaround which allows you to move ahead
with testing the -DBUILD_THE_BUILDTOOLS=OFF builds.

Alan

__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to