Eu estou tentando compilar no CygWin 64 bits a (suposta) sequência de 32 bits na ferramenta lan aqui criados por Thomas Krennwallner, supostos para compilar no Unix e no Windows sob o CygWin.
Após o download, eu fiz:
tar -zxvf wol-0.7.1.tar.gz
e, a fim de atualizar seu script configure.guess (o incluído é um pouco antigo: a partir de 2004), eu fiz o download de aqui .
Então, de acordo com seu arquivo README
, eu faço:
./configure
e eu recebo:
Luis@Windu /cygdrive/h/Temporal/wol/wol-0.7.1
$ ./configure
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See 'config.log' for more details.
Este é o meu config.log:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = Windu
uname -m = x86_64
uname -r = 1.7.33-2(0.280/5/3)
uname -s = CYGWIN_NT-6.1
uname -v = 2014-11-13 15:47
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64
PATH: /cygdrive/c/Program Files (x86)/AMD APP/bin/x86
PATH: /cygdrive/c/Windows/system32
PATH: /cygdrive/c/Windows
PATH: /cygdrive/c/Windows/System32/Wbem
PATH: /cygdrive/c/Windows/System32/WindowsPowerShell/v1.0
PATH: /cygdrive/c/ATI Technologies - Graphics/ATI.ACE/Core-Static
PATH: /cygdrive/d/Utilidades/UnxUtils
PATH: /cygdrive/d/Utilidades/CURL
PATH: /cygdrive/d/Utilidades/SSH-Rsync/cwRsync/bin
PATH: /cygdrive/d/Utilidades/Copy Path To Clipboard
PATH: /cygdrive/d/Programas/HashCat/OCLHashCat
PATH: /cygdrive/d/Utilidades/Scripts
PATH: /cygdrive/d/Utilidades/SysInternals Suite - PSTools
PATH: /cygdrive/d/Utilidades/NirSoft NirCmd
PATH: /cygdrive/c/nmap
PATH: /cygdrive/c/Bitvise SSH Client
PATH: /cygdrive/d/Utilidades/Scripts/Clortho
PATH: /cygdrive/c/Nmap
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1348: checking build system type
configure:1366: result: x86_64-unknown-cygwin
configure:1374: checking host system type
configure:1388: result: x86_64-unknown-cygwin
configure:1428: checking for a BSD-compatible install
configure:1483: result: /usr/bin/install -c
configure:1494: checking whether build environment is sane
configure:1537: result: yes
configure:1570: checking for gawk
configure:1586: found /usr/bin/gawk
configure:1596: result: gawk
configure:1606: checking whether make sets $(MAKE)
configure:1626: result: yes
configure:1810: checking for style of include used by make
configure:1838: result: GNU
configure:1909: checking for gcc
configure:1925: found /usr/bin/gcc
configure:1935: result: gcc
configure:2179: checking for C compiler version
configure:2182: gcc --version </dev/null >&5
gcc (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2185: $? = 0
configure:2187: gcc -v </dev/null >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc_old/gcc-4.8.3-5.x86_64/src/gcc-4.8.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.8.3 (GCC)
configure:2190: $? = 0
configure:2192: gcc -V </dev/null >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2195: $? = 1
configure:2218: checking for C compiler default output file name
configure:2221: gcc conftest.c >&5
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find crt0.o: No such file or directory
/usr/lib/gcc/x86_64-pc-cygwin/4.8.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcygwin
collect2: error: ld returned 1 exit status
configure:2224: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "wol"
| #define VERSION "0.7.1"
| #define PACKAGE "wol"
| #define VERSION "0.7.1"
| #define _GNU_SOURCE 1
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2263: error: C compiler cannot create executables
See 'config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-cygwin
ac_cv_build_alias=x86_64-unknown-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-cygwin
ac_cv_host_alias=x86_64-unknown-cygwin
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run aclocal-1.7'
ALLOCA=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run tar'
AUTOCONF='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run autoconf'
AUTOHEADER='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run autoheader'
AUTOMAKE='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run automake-1.7'
AWK='gawk'
BUILD_INCLUDED_LIBINTL=''
CATOBJEXT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='cygpath -w'
DATADIRNAME=''
DEFS=''
DEPDIR='.deps'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXTRA_LIBS=''
GENCAT=''
GLIBC21=''
GMSGFMT=''
HAVE_ASPRINTF=''
HAVE_POSIX_PRINTF=''
HAVE_SNPRINTF=''
HAVE_WPRINTF=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
LDFLAGS=''
LIBICONV=''
LIBINTL=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /cygdrive/h/Temporal/wol/wol-0.7.1/missing --run makeinfo'
MKINSTALLDIRS=''
MSGFMT=''
MSGMERGE=''
OBJEXT=''
P2M=''
PACKAGE='wol'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PERL=''
POD2TEXI_FALSE=''
POD2TEXI_TRUE=''
POSUB=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
USE_INCLUDED_LIBINTL=''
USE_NLS=''
VERSION='0.7.1'
XGETTEXT=''
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build='x86_64-unknown-cygwin'
build_alias=''
build_cpu='x86_64'
build_os='cygwin'
build_vendor='unknown'
datadir='${prefix}/share'
exec_prefix='NONE'
host='x86_64-unknown-cygwin'
host_alias=''
host_cpu='x86_64'
host_os='cygwin'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/cygdrive/h/Temporal/wol/wol-0.7.1/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "wol"
#define PACKAGE "wol"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.7.1"
#define VERSION "0.7.1"
#define _GNU_SOURCE 1
configure: exit 77
Isso parece estar reportando o problema esperado quando compila um programa de 32 bits em uma plataforma de 64 bits .
É possível resolver isso ?
Eu li algumas informações sobre o uso do sinalizador "-m32" no compilador gcc, ou enviando algumas variáveis (exportando) antes da compilação, mas o problema parece vir da parte de configuração, não da compilação. A ordem parece ser:
- .configure
- fazer
- efetue o check
- faça a instalação
- tornar limpo
e o primeiro passo falha :-(.
Enfim, eu tentei:
export CFLAGS='-m32' export CXXFLAGS='-m32' export LDFLAGS='-m32'
Mas o script ./configure
continua falhando.
E, a propósito, tentei ignorar o erro e continuar (segundo passo) compilando:
make
mas gera algum relatório de mensagens de erro (desculpe, meu CygWin parece estar em espanhol) algo como No objective specified and no makefile found
.
Eu acho que resolver esse problema poderia me ajudar a aprender uma maneira de compilar programas de 32 bits no CygWin 64.
Eu peço ajuda, por favor.
P.S: Eu sei que esta ferramenta tem uma versão do Win32 disponível para download, assim como existem outros programas para ativar na LAN. Mas onde está o aprendizado dessa maneira para resolver as coisas?
EDIT: Eu instalei os seguintes nomes de pacotes no CygWin:
gcc-core
gdb
make
mingw-gcc-core
mingw-gcc-g++
mingw-w32api
EDIT-2: Eu salvei meu dia desinstalando o CygWin 64 bits e instalando a versão de 32 bits. Tudo correu bem e bem.