> You aren't building with a separate prefix, so you are installing
> right into your root.  This can cause issues if you have conflicting
> versions of things installed.  You are best to install into some
> prefix outside of your main tree until you get the hang of it.
>
> I suggest building everything with --prefix=/opt/w64 or something
> similar.  Then just put /opt/w64/bin in your PATH.


Thanks, NightStrike, this helped some. I'm following the instructions
here: 
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-doc/howto-build/mingw-w64-howto-build.txt?revision=1281&view=markup

I believe that there is a problem with "install the mingw-w64 header
set", on step 2. It says to do this:
cp -r include /mypath/x86_64-w64-mingw32/

Shouldn't it be this:
mkdir /mypath/x86_64-w64-mingw32/include
cp -r include /mypath/x86_64-w64-mingw32/include

?

Without doing it the latter way, making gcc subsequently fails with
"cannot find /mypath/mingw/include".

But now, it is still failing on building the crt, with this error:


configure:3141: $? = 0
configure:3148: x86_64-w64-mingw32-gcc -v >&5
Using built-in specs.
Target: x86_64-w64-mingw32
Configured with: ../configure --target=x86_64-w64-mingw32
--enable-targets=all --prefix=/opt/w64 --with-sysroot=/opt/w64
Thread model: win32
gcc version 4.4.1 20090505 (prerelease) (GCC)
configure:3152: $? = 0
configure:3159: x86_64-w64-mingw32-gcc -V >&5
x86_64-w64-mingw32-gcc: '-V' option must have argument
configure:3163: $? = 1
configure:3186: x86_64-w64-mingw32-gcc -o conftest    conftest.c  >&5
/tmp/ccNWc2p8.s: Assembler messages:
/tmp/ccNWc2p8.s:2: Error: unknown pseudo-op: `.def'
/tmp/ccNWc2p8.s:2: Error: unknown pseudo-op: `.scl'
/tmp/ccNWc2p8.s:2: Error: unrecognized symbol type "32"
/tmp/ccNWc2p8.s:2: Error: unknown pseudo-op: `.endef'
/tmp/ccNWc2p8.s:5: Error: unknown pseudo-op: `.def'
/tmp/ccNWc2p8.s:5: Error: unknown pseudo-op: `.scl'
/tmp/ccNWc2p8.s:5: Error: unrecognized symbol type "32"
/tmp/ccNWc2p8.s:5: Error: unknown pseudo-op: `.endef'
configure:3190: $? = 1
configure:3395: checking whether we are cross compiling
configure:3397: result: yes
configure:3401: checking for suffix of object files
configure:3427: x86_64-w64-mingw32-gcc -c   conftest.c >&5
/tmp/cc0D8UM7.s: Assembler messages:
/tmp/cc0D8UM7.s:2: Error: unknown pseudo-op: `.def'
/tmp/cc0D8UM7.s:2: Error: unknown pseudo-op: `.scl'
/tmp/cc0D8UM7.s:2: Error: unrecognized symbol type "32"
/tmp/cc0D8UM7.s:2: Error: unknown pseudo-op: `.endef'
/tmp/cc0D8UM7.s:5: Error: unknown pseudo-op: `.def'
/tmp/cc0D8UM7.s:5: Error: unknown pseudo-op: `.scl'
/tmp/cc0D8UM7.s:5: Error: unrecognized symbol type "32"
/tmp/cc0D8UM7.s:5: Error: unknown pseudo-op: `.endef'
configure:3431: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "mingw-w64-runtime"
| #define PACKAGE_TARNAME "mingw-w64-runtime"
| #define PACKAGE_VERSION "1.0b"
| #define PACKAGE_STRING "mingw-w64-runtime 1.0b"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE "mingw-w64-runtime"
| #define VERSION "1.0b"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3445: error: in
`/home/matthew/source/mingw64/mingw/mingw-w64-crt/build':
configure:3448: error: cannot compute suffix of object files: cannot compile

I'm sorry to be such a bother. The instructions looked simple enough,
but I guess I'm still missing something.

Thanks,
Matthew

Here's the build script as modified to use /opt/w64:

#! /bin/sh

target=x86_64-w64-mingw32
prefix=/opt/w64
top_dir=`pwd`

sudo rm -rf $prefix
sudo mkdir $prefix
#sudo chown $USER $prefix

cd binutils/src
rm -rf build
mkdir build
cd build
../configure --target=$target \
    --enable-targets=$target,i686-w64-mingw32 \
    --with-sysroot=/mypath --prefix=/mypath

if  make ; then
    echo "built binutils successfully" ;
else
    echo "make failed on binutils"
    exit ;
fi

sudo make install

cd $top_dir/mingw/mingw-w64-headers
# copy include directory
sudo mkdir -p $prefix/$target/include
sudo cp -r include $prefix/$target/include
# gcc requires it be mirrored
sudo ln -s $prefix/$target $prefix/mingw
# create lib directory
sudo mkdir $prefix/$target/lib
sudo ln -s $prefix/$target/lib $prefix/$target/lib64

# configure and build gcc
cd $top_dir/gcc/gcc
rm -rf build
mkdir build
cd build
../configure --target=$target --enable-targets=all --prefix=$prefix
--with-sysroot=$prefix
if  make all-gcc  ; then
    echo "built gcc successfully" ;
else
    echo "make failed on gcc"
    exit ;
fi

sudo make install-gcc

PATH="$prefix/bin:$PATH"
export PATH

# configure and build crt
cd $top_dir/mingw/mingw-w64-crt
rm -rf build
mkdir build
cd build
../configure --host=$target --enable-lib32 --prefix=$prefix
--with-sysroot=$prefix
if  make  ; then
    echo "built crt successfully" ;
else
    echo "make failed on crt"
    exit ;
fi
sudo make install

# finish gcc
cd $top_dir/gcc/build
if  make ; then
    echo "built rest of gcc successfully" ;
else
    echo "make failed on rest of gcc"
    exit ;
fi
sudo make install

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to