-- 
Tuomo
--- Begin Message ---
Tuomo, I keep getting bounced by berlios when I send mail through
Gmail's web interface. I will look and see if there is some Gmail
setting I can tweak. In the meanwhile, would you mind sending this to
the list?

Thanks,

-Bryan
aka chreekat


---------- Forwarded message ----------
From: Bryan Richter <[EMAIL PROTECTED]>
Date: Jan 3, 2008 11:16 AM
Subject: Re: Compile error under cygwin
To: [EMAIL PROTECTED]



On Dec 29, 2007 2:06 AM, Tuomo Valkonen <[EMAIL PROTECTED]> wrote:
> On 2007-12-29, Tuomo Valkonen <[EMAIL PROTECTED]> wrote:
> > This is the standard GCC/*nix linker brain damage: you have to have
> > the libs meticulouslu ordered on the command line. It wants -lintl
> > after -ltu. Trying to arrange for that is pain. gcc/ld sucks.
>
> It may help to change the order of LIBS and EXTRA_LIBS in LDFLAGS in
> system.mk. But it may break something else.
>

Yes, this did work. If my home computer had not just suffered a
massive hardware failure, I would test to see if changing the order of
those variables didn't also work under Linux. Could someone else
quickly try it? Perhaps, if it works, it could be committed to the
official repo's system.mk.

=========================
diff -Nuar ion-3rc-20071220/system.mk ion-3rc-20071220.1/system.mk
--- ion-3rc-20071220/system.mk  2007-12-20 10:46:46.000000000 -0800
+++ ion-3rc-20071220.1/system.mk        2008-01-02 12:12:45.000000000 -0800
@@ -135,7 +136,7 @@
        -Wparentheses -pedantic -Wuninitialized

 CFLAGS=-Os $(WARN) $(DEFINES) $(EXTRA_INCLUDES) $(INCLUDES)
-LDFLAGS=-Os $(EXTRA_LIBS) $(LIBS)
+LDFLAGS=-Os $(LIBS) $(EXTRA_LIBS)
 EXPORT_DYNAMIC=-Xlinker --export-dynamic

 # The following options are mainly for development use and can be used
=========================

Further, I have a successful method for compiling under Cygwin.
However, the method requires a patch, and I do not want to update that
patch with each new release. A better method is possible, perhaps.

The two problems with compiling Ion are
(1) Windows does not have getloadavg, and with the way
libextl_mkexports works, the only quick way to avoid this problem is
to obliterate all references to getloadavg. This means deleting (not
commenting out!) a couple functions and the whole file
utils/ion-statusd/statusd_load.lua.
(2) Cygwin's gcc appends ".exe" to executables, which means Makefiles
must be modified accordingly.

To fix this, I suggest creating a system.mk variable (or perhaps two,
for robustness), and then making proper logic in ... somewhere. (I
would need help finding the best place to do this. One of the Makefile
includes? Adding flags to libextl's comment identifiers?) Or maybe an
easier way already exists?

Tuomo, you may not care about this at all. Certainly there can't be
many people running Ion in Cygwin. However, if I could get some
pointers on the best way to do this, or perhaps simply your
_preferred_ way, I would appreciate it.

-Bryan

--
Bryan Richter
aka chreekat

--- End Message ---

Reply via email to