Make 오류 : emmake make는 libxml2를 빌드하려고 할 때 오류가 발생하고 libxml.so.2를 찾을 수 없습니다.

윌 프레도 알다 론도

내 목표는 내 C 프로그램을 emscripten (emsdk를 통해 설치)을 사용하여 wasm으로 컴파일하는 것입니다. libxml2를 사용합니다. https://github.com/kripken/xml.js/blob/master/script/libxml2설명 된 단계에 따라 적절한 emscripten 매개 변수를 사용하여 소스에서 libxml2를 빌드합니다. 를 실행 emmake make하면 다음과 같은 경고 및 오류가 표시됩니다.

...

CCLD     libxml2.la
emcc: warning: linking a library with `-shared` will emit a static object file.
This is a form of emulation to support existing build systems.  
If you want to build a runtime shared library use the SIDE_MODULE setting. [-Wemcc]
emcc: warning: ignoring unsupported linker flag: `--version-script=./libxml2.syms` [-Wlinkflags]
wasm-ld: error: cannot open libxml2.so.2: No such file or directory
emcc: error: '/home/willy/emsdk/upstream/bin/wasm-ld -o .libs/libxml2.so.2.9.9 .libs/SAX.o .libs/entities.o .libs/encoding.o -L/home/willy/emsdk/upstream/emscripten/system/local/lib .libs/error.o -L/home/willy/emsdk/upstream/emscripten/system/lib .libs/parserInternals.o -L/home/willy/emsdk/upstream/emscripten/cache/wasm .libs/parser.o .libs/tree.o .libs/hash.o .libs/list.o .libs/xmlIO.o .libs/xmlmemory.o .libs/uri.o .libs/valid.o .libs/xlink.o .libs/HTMLparser.o .libs/HTMLtree.o .libs/debugXML.o .libs/xpath.o .libs/xpointer.o .libs/xinclude.o .libs/nanohttp.o .libs/nanoftp.o .libs/catalog.o .libs/globals.o .libs/threads.o .libs/c14n.o .libs/xmlstring.o .libs/buf.o .libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o .libs/xmlunicode.o .libs/xmlreader.o .libs/relaxng.o .libs/dict.o .libs/SAX2.o .libs/xmlwriter.o .libs/legacy.o .libs/chvalid.o .libs/pattern.o .libs/xmlsave.o .libs/xmlmodule.o .libs/schematron.o .libs/xzlib.o /home/willy/emsdk/upstream/emscripten/cache/wasm/libc.a libxml2.so.2 --relocatable -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
make[2]: *** [Makefile:1065: libxml2.la] Error 1
make[2]: Leaving directory '/home/willy/CWasmSandbox/libxml2-2.9.9'
make[1]: *** [Makefile:1484: all-recursive] Error 1
make[1]: Leaving directory '/home/willy/CWasmSandbox/libxml2-2.9.9'
make: *** [Makefile:897: all] Error 2

내가 emscripten에 대한 제한된 이해를 가지고 모을 수있는 유일한 것은 libxml2.so.2정상적인 상황에서에서 생성되는 액세스 시도한다는 것 입니다 libxml2.la. 그러나 libxml2.so.2emscripten은 공유 객체를 생성하지 않기 때문에 생성되지 않았습니다. 이 평가가 맞습니까? 옵션 CFLAGS="-s SIDE_MODULE=1"을에 전달하려고 시도했지만 make오류가 수정되지 않았으며 빌드 시스템에 대한 제한된 지식에서 태어난 어리석은 아이디어 일 것입니다. 나는 또한 libxml2.so.2 이전 설치에서 적절한 디렉토리로 복사 시도 했지만 운이없고 emscripten이 .so 파일을 사용하지 않기 때문에 일종의 바보입니까? 다음 단계는 무엇입니까?

Ryszard Grzesica

가장 쉬운 방법은 공유 라이브러리에서 사임하는 것입니다.

공유 모듈 (사이드 모듈)에는 중요한 제한이 있습니다. 기본 응용 프로그램에서 스레드를 사용하려는 경우 작동하지 않습니다.

그래서 그냥 변경하십시오 ./script/libxml2

-emconfigure ../libxml2/configure --with-http=no --with-ftp=no --with-python=no --with-threads=no
+emconfigure ../libxml2/configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no

./build/.libs/libxml2.a기본 애플리케이션을 빌드하고 연결 합니다.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관