Re: error compiling postgresql with fedora mingw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 26, 2008 at 03:42:56PM +0100, Farkas Levente wrote:
> Ralf Corsepius wrote:
> > On Wed, 2008-11-26 at 09:14 -0500, Tom Lane wrote:
> >> Ralf Corsepius <rc040203@xxxxxxxxxx> writes:
> >>> On Wed, 2008-11-26 at 11:05 +0000, Daniel P. Berrange wrote:
> >>>> On Tue, Nov 25, 2008 at 02:19:27PM -0500, Tom Lane wrote:
> >>>>> That makes sense.  Could you have simplified matters by just prepending
> >>>>> /usr/i686-pc-mingw32/bin to your PATH?
> >>> That said, I also recommend against this habit - In case of properly
> >>> packaged autoconf/automake-based packages it definitely wrong.
> >> Seems like these choices are carefully calculated to cause the maximum
> >> amount of pain to *both* the upstream projects and the poor sods trying
> >> to build them.
> > The logic actually is very simple:
> > 
> > configure --host=i686-pc-mingw32
> > will search for i686-pc-mingw32-prefixed tools (such as
> > i686-pc-mingw32-gcc) in $PATH.
> 
> there is a fedora-mingw list which is the right place to ask.
> anyway in the latest mingw32-filesystem there is a script
> mingw32-configure which do it right.

Yes, to be clearer what Levente means is that you should use:

  %{_mingw32_configure}

in RPM specfiles, and if just building from the command line use:

  mingw32-configure

Both are merely wrappers around this basic command:

  ./configure --host=i686-pc-mingw32

except that they set a lot more paths and a environment variables,
which are needed in rarer / corner cases.

The full expansion is below for anyone who is interested, although
only PKG_CONFIG_PATH is needed in 95% of cases.

Rich.

  HOST_CC=gcc; export HOST_CC; 
  AS="i686-pc-mingw32-as"; export AS; 
  AR="i686-pc-mingw32-ar"; export AR; 
  NM="i686-pc-mingw32-nm"; export NM; 
  OBJDUMP="i686-pc-mingw32-objdump"; export OBJDUMP; 
  PKG_CONFIG_PATH="/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig"; export PKG_CONFIG_PATH; 
  CC="${MINGW32_CC:-i686-pc-mingw32-gcc}"; export CC; 
  CXX="${MINGW32_CXX:-i686-pc-mingw32-g++}"; export CXX; 
  CFLAGS="${MINGW32_CFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields}"; export CFLAGS; 
  CXXFLAGS="${MINGW32_CXXFLAGS:--O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields}"; export CXXFLAGS; 
  for i in `ls /usr/i686-pc-mingw32/sys-root/mingw/bin|grep -- "-config$"` ; do 
    CONFIG_NAME=`echo $i|tr "a-z-" "A-Z_"`; 
    declare -x $CONFIG_NAME="/usr/i686-pc-mingw32/sys-root/mingw/bin/$i" ; export $CONFIG_NAME; 
  done ; 
  ./configure --cache-file=mingw32-config.cache \
        --host=i686-pc-mingw32 \
        --build=x86_64-unknown-linux-gnu \
        --target=i686-pc-mingw32 \
        --prefix=/usr/i686-pc-mingw32/sys-root/mingw \
        --exec-prefix=/usr/i686-pc-mingw32/sys-root/mingw \
        --bindir=/usr/i686-pc-mingw32/sys-root/mingw/bin \
        --sbindir=/usr/i686-pc-mingw32/sys-root/mingw/sbin \
        --sysconfdir=/usr/i686-pc-mingw32/sys-root/mingw/etc \
        --datadir=/usr/i686-pc-mingw32/sys-root/mingw/share \
        --includedir=/usr/i686-pc-mingw32/sys-root/mingw/include \
        --libdir=/usr/i686-pc-mingw32/sys-root/mingw/lib \
        --libexecdir=/usr/i686-pc-mingw32/sys-root/mingw/libexec \
        --localstatedir=/usr/i686-pc-mingw32/sys-root/mingw/var \
        --sharedstatedir=/usr/i686-pc-mingw32/sys-root/mingw/com \
        --mandir=/usr/i686-pc-mingw32/sys-root/mingw/share/man \
        --infodir=/usr/i686-pc-mingw32/sys-root/mingw/share/info


-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 68 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux