오랜만에, Mac 업그레이드 후에 처음으로 MacOSX 10.15 Catalina 에서 LibreOffice(리브레오피스) 빌드를 진행하였습니다.
LibreOffice(리브레오피스) 빌드는 문서 재단의 위키 링크 Building LibreOffice on macOS를 보며 따라하였습니다.
빌드를 진행하다 보니, 아래의 오류로 빌드 진행이 안되는 것을 확인하였습니다.
In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/Python.h:139:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/pythonrun.h:142:5: error: 'TAPI' is not defined, evaluates to 0 [-Werror,-Wundef]
#if TAPI
^
[AIN] ooo_images
1 error generated.
/Users/****/dev/lode/dev/core/solenv/gbuild/LinkTarget.mk:239: recipe for target '/Users/****/dev/lode/dev/core/workdir/CObject/pyuno/source/module/pyuno_dlopenwrapper.o' failed
make[1]: *** [/Users/****/dev/lode/dev/core/workdir/CObject/pyuno/source/module/pyuno_dlopenwrapper.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:282: recipe for target 'build' failed
make: *** [build] Error 2
해당 내용에서는 C언어 매크로 TAPI
가 정의 안되어서 빌드 에러가 난다는 이야기가 나왔습니다.
해당 내용에 대하여 IRC의 #libreoffice-dev
채널에 문의를 하였습니다.
9:28 PM I have a question about build on MacOSX (Catalina 10.15.2)
9:28 PM I get a LibreOffice source from git repository. and try to build, then failed.
9:29 PM message is In file included from ***/dev/core/pyuno/source/module/pyuno_dlopenwrapper.c:22:
9:29 PM In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/Python.h:139:
9:29 PM /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/pythonrun.h:142:5: error: 'TAPI' is not defined, evaluates to 0 [-Werror,-Wundef]
9:30 PM What is "#if TAPI" ?
9:41 PM <mikekaganski> dhsung_: a coincidence: https://ask.libreoffice.org/en/question/223751
9:44 PM <ycao> https://ask.libreoffice.org/en/question/223751/error-tapi-is-not-defined-evaluates-to-0-werror-wundef-while-building-on-macos/
9:44 PM Any tips?
9:44 PM <_rene_> yes, the obvious one
9:44 PM (don't build with -Werror)
9:45 PM and this undefined macro is inside python itself which is clear from the error message... (just that LO bundles python if you let it..)
9:45 PM <mikekaganski> _rene_: the problem is that this looks like our default in LODE
9:46 PM <ycao> How can I build without `-Werror`
9:46 PM Using `lode`
9:46 PM <_rene_> mikekaganski: yes, it's a problem. anywhere :)
9:46 PM $ ./configure --help | grep -i werror --enable-werror Turn warnings to errors. (Has no effect in modules
9:47 PM so --disable-werror, of course ;)
9:48 PM <ycao> So run `./configure --disable-werror` is ok?
9:48 PM <mikekaganski> ycao: essentially, add --disable-werror which _rene_ mentioned to autogen.input in your core directory
문의 결과
./configure --help | grep -i werror --enable-werror Turn warnings to errors.
빌드 '에러 error'를 에러 대신 '경고 warning'로 바꾸어서 빌드하라고 하더군요.
이유는 TAPI
라는 정의되지 않은 매크로는 파이썬 자체에 있고, 이 매크로를 무시해도 빌드 후에 실행은 되니 '에러 error'로 빌드 안되는 것에 대하여 '에러 error'레벨을 '경고 warning'으로 바꾸어서 빌드 하면 된다고 하군요.
그래서, 저는 아래의 명령어로 빌드 진행을 하였습니다.
이후, 빌드 후 확인
****@**** core % ./autogen.sh --with-locales="ko" --with-vendor="DaeHyun Sung, TDF Member" --disable-werror
********************************************************************
*
* Using commandline arguments and ignoring autogen.input!
*
********************************************************************
Running ./configure with '--with-locales=ko --with-vendor=DaeHyun Sung, TDF Member --disable-werror --srcdir=/Users/sungdaehyun/dev/lode/dev/core --enable-option-checking=fatal'
********************************************************************
*
* Running LibreOffice build configuration.
*
********************************************************************
To build, run:
/Users/****/lode/opt/bin/make
To view some help, run:
/Users/****/lode/opt/bin/make help
After the build of LibreOffice has finished successfully, you can immediately run LibreOffice using the command:
open instdir/LibreOfficeDev.app
If you want to run the smoketest, run:
/Users/****/lode/opt/bin/make check
****@**** core % make build-nocheck
make -j 4 -rs -f /Users/****/lode/dev/core/Makefile.gbuild build
[PAT] boost
[DEP] LNK:Library/libuno_salhelpergcc3.dylib.3
[LNK] Library/libuno_salhelpergcc3.dylib.3
[UPK] libgpg-error-1.27.tar.bz2
[PAT] icu
[PAT] nss
[PAT] liblangtag
[DEP] LNK:Executable/bestreversemap
[LNK] Executable/bestreversemap
[PAT] libjpeg-turbo
[PAT] lcms2
(생략)
[BIN] extras
[MOD] extras
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only
빌드 완료 후 실행
****@**** core % open instdir/LibreOfficeDev.app
실행 후 화면
'컴퓨터 > Open source' 카테고리의 다른 글
Spring boot 2.3.0 출시 (0) | 2020.05.22 |
---|---|
2019년 핵토버페스트(Hacktoberfest) 참여 후기 (5) | 2020.01.06 |
g0v — Fork the Government (오드리탕[唐鳳, Audrey Tang]씨의 2015년 g0v발표 슬라이드 및 동영상 (0) | 2017.05.14 |
미국 정부, Cloud Platform 구축 (0) | 2015.10.12 |
그놈 3.18 소개(Introducing GNOME 3.18) 동영상 (0) | 2015.10.04 |