MinGW에이 project을 크로스 컴파일하려고합니다.gnulib 기반 프로젝트를 MinGW로 크로스 컴파일
프로젝트는 빌드 시스템으로 autotools를 사용하며 libcurl, CUnit, Jansson 및 일부 gnulib 모듈에 의존합니다.
$ gnulib-tool --update
$ autoreconf -fi
$ CURL_CFLAGS="-I/home/user/mingw64/usr/local/include" \
CURL_LIBS="-L/home/user/mingw64/usr/local/lib -lcurl" \
JANSSON_CFLAGS="-I/home/user/mingw64/usr/local/include" \
JANSSON_LIBS="-L/home/user/mingw64/usr/local/lib -ljansson" \
CUNIT_CFLAGS="-I/home/user/mingw64/usr/local/include" \
CUNIT_LIBS="-L/home/user/mingw64/usr/local/lib -lcunit" \
./configure --host=x86_64-w64-mingw32
$ make
그리고이 오류가 얻을 :
나는 모든 의존성이 /home/user/mingw64
에서 x86_64-w64-mingw32
컴파일 및 설치 한 나는 실행
make all-recursive
make[1]: Entering directory '/home/user/projects/shill'
Making all in po
make[2]: Entering directory '/home/user/projects/shill/po'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/user/projects/shill/po'
Making all in lib
make[2]: Entering directory '/home/user/projects/shill/lib'
make[2]: *** No rule to make target 'lib/errno.h', needed by 'all'. Stop.
make[2]: Leaving directory '/home/user/projects/shill/lib'
Makefile:1897: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/projects/shill'
Makefile:1429: recipe for target 'all' failed
make: *** [all] Error 2
errno.h
가 gnulib 모듈의 일부를 .
# Find gnulib headers.
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = \
-DLOCALEDIR='"$(localedir)"' \
-Ilib -I$(top_srcdir)/lib \
-Isrc -I$(top_srcdir)/src \
을하지만 해결책을 알아낼 수 없습니다 : 그래서 문제가 Makefile.am이 부분에서 오는 것이라고 생각합니다. 나는 정확히 gnulib manual에 설명 된 지침을 따랐다.
일부 Makefile에는'all : ... lib/errno.h ... '와 같은 줄이 있습니다.'(또는 변수 대체 후 확장되는 행)이 문제의 근본 원인입니다. –
@RossRidge 모든 Makefile은 autotools에 의해 자동 생성되므로 오류를 찾아서 고칠 수 있더라도 작동하지 않습니다. 'Makefile'은 재생성되고 수정 사항을 덮어 씁니다. –
소스를 수정하여 문제를 해결하십시오. –