Hi,
I want to cross compile on a Fedora Linux system for a Windows system,
using the mingw32 compiler packages. I have abinit sources 6.0.4.
I start with the configure, as follows:
./configure --prefix=/opt/abinit \
--disable-netcdf --disable-bigdft --disable-wannier90 --disable-libxc \
--enable-optim="no" \
--target=i686-pc-mingw32 --host=i686 \
CC="/usr/bin/i686-pc-mingw32-gcc" \
FC="/usr/bin/i686-pc-mingw32-gfortran"
Then the make ends with this:
/usr/bin/i686-pc-mingw32-gfortran -ffree-form -J/home/software/abinit-6.0.4/src/mods -O0 -g -ffree-line-length-none -o abinetcdf.exe abinetcdf-abinetcdf.o ../../src/10_defs/lib10_defs.a
../../src/10_defs/lib10_defs.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
I can solve the problem for this particular line by manually typing:
/usr/bin/i686-pc-mingw32-ranlib src/10_defs/lib10_defs.a
make
but then the make gets stuck at a next similar problem with "src/95_drive/lib95_drive.a".
etc. etc.
I am able to resolve these problems by manually run /usr/bin/i686-pc-mingw32-ranlib
on every archive, which causes a problem (see complete list below)
Is this "ranlib" thing a missing feature in the generated Makefiles?
Or have I been doing something wrong?
Thank you!
Rob.
List of files which need a 'ranlib' for make to complete successfully:
prereqs/linalg/libblas.a
prereqs/linalg/liblapack.a
src/01_interfaces_ext/lib01_interfaces_ext.a
src/01_macroavnew_ext/lib01_macroavnew_ext.a
src/10_defs/lib10_defs.a
src/12_hide_mpi/lib12_hide_mpi.a
src/14_hidewrite/lib14_hidewrite.a
src/16_hideleave/lib16_hideleave.a
src/18_timing/lib18_timing.a
src/27_toolbox_oop/lib27_toolbox_oop.a
src/28_numeric_noabirule/lib28_numeric_noabirule.a
src/32_contract/lib32_contract.a
src/32_util/lib32_util.a
src/42_geometry/lib42_geometry.a
src/42_nlstrain/lib42_nlstrain.a
src/42_parser/lib42_parser.a
src/45_psp_parser/lib45_psp_parser.a
src/47_xml/lib47_xml.a
src/49_gw_toolbox_oop/lib49_gw_toolbox_oop.a
src/50_abitypes_defs/lib50_abitypes_defs.a
src/51_manage_mpi/lib51_manage_mpi.a
src/51_manage_mpi/lib51_manage_mpi.a
src/52_fft_mpi_noabirule/lib52_fft_mpi_noabirule.a
src/53_abiutil/lib53_abiutil.a
src/53_ffts/lib53_ffts.a
src/53_spacepar/lib53_spacepar.a
src/56_recipspace/lib56_recipspace.a
src/56_xc/lib56_xc.a
src/57_iovars/lib57_iovars.a
src/59_io_mpi/lib59_io_mpi.a
src/61_ionetcdf/lib61_ionetcdf.a
src/62_cg_noabirule/lib62_cg_noabirule.a
src/62_iowfdenpot/lib62_iowfdenpot.a
src/62_occeig/lib62_occeig.a
src/62_poisson/lib62_poisson.a
src/62_wvl_wfs/lib62_wvl_wfs.a
src/63_bader/lib63_bader.a
src/64_atompaw/lib64_atompaw.a
src/65_nonlocal/lib65_nonlocal.a
src/65_psp/lib65_psp.a
src/66_paw/lib66_paw.a
src/66_wfs/lib66_wfs.a
src/67_common/lib67_common.a
src/68_dmft/lib68_dmft.a
src/68_gw/lib68_gw.a
src/68_recursion/lib68_recursion.a
src/68_rsprc/lib68_rsprc.a
src/69_bse/lib69_bse.a
src/72_geomoptim/lib72_geomoptim.a
src/72_response/lib72_response.a
src/77_ddb/lib77_ddb.a
src/77_lwf/lib77_lwf.a
src/77_suscep/lib77_suscep.a
src/79_seqpar_mpi/lib79_seqpar_mpi.a
src/83_cut3d/lib83_cut3d.a
src/93_rdm/lib93_rdm.a
src/95_drive/lib95_drive.a
Cross compile error (mingw32 on linux)
Moderators: fgoudreault, mcote
Forum rules
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Please have a look at ~abinit/doc/config/build-config.ac in the source package for detailed and up-to-date information about the configuration of Abinit 8 builds.
For a video explanation on how to build Abinit 7.x for Linux, please go to: http://www.youtube.com/watch?v=DppLQ-KQA68.
IMPORTANT: when an answer solves your problem, please check the little green V-like button on its upper-right corner to accept it.
Re: Cross compile error (mingw32 on linux)
Hello,
It seems to me that the host should match the prefix of your utilities.
Should use.
It seems to me that the host should match the prefix of your utilities.
./configure --prefix=/opt/abinit \
--disable-netcdf --disable-bigdft --disable-wannier90 --disable-libxc \
--enable-optim="no" \
--target=i686-pc-mingw32 --host=i686
Should use
Code: Select all
--host=i686-pc-mingw32
-
- Posts: 35
- Joined: Wed Jan 20, 2010 3:08 am
Re: Cross compile error (mingw32 on linux)
Thank you!
That solved the problem.
R.
That solved the problem.
R.