이번에 Apple M1탑재된 MacBook Air를 구입하였습니다.



Apple M1 구입후, 초기 설정을 열심히 하였습니다.


초기 설정후, Xcode와 Homebrew를 설치하여, 소프트웨어 빌드 설정을 하였습니더.

Brew 링크
https://brew.sh/

Homebrew

The Missing Package Manager for macOS (or Linux).

brew.sh

개발 환경 설정을 한후에, 예전에 Intel기반의 Macbook Pro 2013 Late에서 설정했던 LODE를 이용하여 빌드 환경을 설정하였습니다.
https://wiki.documentfoundation.org/Development/lode
빌드 환경 설정이 완료되어서 core (LibreOffice의 빌드 소스) 디렉토리로 이동하여, 다음의 명령어로 빌드를 실행하였습니다.

./autogen.sh --with-locales="ko en-US zh ja" --with-vendor="DaeHyunSung" --disable-werror --with-lang="ko en-US ja zh-TW zh-CN" --enable-dbgutil

그런데, 빌드 설정이 실패하였습니다.

configure: error: in `/Users/sungdaehyun/dev/lode/dev/core':
configure: error: online update or breakpad/crashreporting are enabled, but no --with-privacy-policy-url=... was provided

해당 이슈에 대해서 왜 나오는지 이유를 알 수 없어, 내용을 IRC로 문의를 하니 다음과 같은 답변을 받았습니다.

10:25 PM <dhsung> Hello 
10:25 PM <dhsung> Today, I bought new Apple M1 MacbookAir. So, I prepare autogen option for build. But, I found the message "online update or breakpad/crashreporting are enabled, but no --with-privacy-policy-url=... was provided" What is mean? 
10:26 PM <mst___> either disable those features or use an arbitrary value for the url, it's just shown in a dialog somewhere

답변을 듣고, 구글링을 하고는 빌드 옵션 --disable-breakpad --disable-online-update를 추가하였습니다.

./autogen.sh --with-locales="ko en-US zh ja" --with-vendor="DaeHyunSung" --disable-werror --with-lang="ko en-US ja zh-TW zh-CN" --enable-dbgutil --disable-breakpad --disable-online-update

옵션 추가 후, 빌드 설정이 완료됨을 나왔습니다.


To build, run:
/Users/****/dev/lode/opt/bin/make

To view some help, run:
/Users/****/dev/lode/opt/bin/make help

After the build has finished successfully, you can immediately run what you built using the command:
open instdir/LibreOfficeDev.app

If you want to run the smoketest, run:
/Users/****/dev/lode/opt/bin/make check

HOST config (config.warn)
*************************************
* WARNING : Cannot find Clang headers to build compiler plugins, plugins disabled.

이후에 make로 빌드를 실행하였습니다.

Apple M1에서 빌드가 완료되고, 다음과 같이 빌드 완료된 프로그램 실행을 해보았습니다.

open instdir/LibreOfficeDev.app

실행이 아주 잘됩니다!

여기까지, Apple M1에서 LibreOffice(리브레오피스) 빌드 및 실행해보기 기록이였습니다.

Buy me a coffeeBuy me a coffee

우분투(Ubuntu)에서 리브레오피스(LibreOffice)의 소스코드를 빌드할 수 있게 의존성 있는 패키지를 가져오도록 하는 선택하는 옵션으로 의존성있는 패키지 설치를 진행해보았습니다.

$ sudo apt build-dep libreoffice
[sudo] password for ***:
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list

아... deb-src URI가 sources.list에 없다고 sources.listdeb-src를 채워놓으라고 하군요.

그럼, sources.listdeb-src URI를 채워넣어야죠.

sources.list 파일을 수정해봅니다.

$ sudo vi /etc/apt/sources.list

이미 deb-src는 있으나 #으로 주석처리되어 있습니다. 그럼, 저장소 목록에 있는 deb-src 앞의 # 주석을 해제합니다.

그리고, 저장소 목록을 다시 업데이트 합니다.

$ sudo apt update

그리고 다시 아래의 명령어로 libreoffice에 대해 빌드할수 있게 의존성있는 패키지를 설치해봅니다.

$ sudo apt-get build-dep libreoffice
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acl ant ant-optional autoconf automake autopoint autotools-dev binutils binutils-common binutils-x86-64-linux-gnu
  bison build-essential ca-certificates-java comerr-dev cpp cpp-9 dctrl-tools debhelper default-jdk
  default-jdk-headless default-jre default-jre-headless default-libmysqlclient-dev devscripts dh-apparmor
  dh-autoreconf dh-python dh-strip-nondeterminism doxygen dpkg-dev dwz evolution-data-server-common fakeroot
  firebird-dev firebird3.0-common firebird3.0-common-doc firebird3.0-server-core flex fontforge-common fontforge-nox
  fonts-crosextra-carlito fonts-dejavu fonts-dejavu-extra fonts-liberation2 fonts-urw-base35 g++ g++-9 gcc gcc-9
  gcc-9-base gdb gettext ghostscript gir1.2-atk-1.0 gir1.2-atspi-2.0 gir1.2-camel-1.2 gir1.2-ebackend-1.2
  gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edatabook-1.2 gir1.2-edataserver-1.2 gir1.2-freedesktop
  gir1.2-gdkpixbuf-2.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gir1.2-gtk-3.0 gir1.2-harfbuzz-0.0
  gir1.2-langtag-0.6 gir1.2-pango-1.0 gir1.2-secret-1 gir1.2-soup-2.4 gobject-introspection gperf graphviz
  hyphen-en-us icu-devtools imagemagick imagemagick-6-common imagemagick-6.q16 intltool-debian java-common javahelper
  junit4 krb5-multidev libabw-0.1-1 libabw-dev libamd2 libann0 libapache-pom-java libarchive-zip-perl libasan5
  libassuan-dev libatk-bridge2.0-dev libatk1.0-dev libatomic1 libatspi2.0-dev libavahi-client-dev libavahi-common-dev
  libb-hooks-op-check-perl libbabeltrace1 libbinutils libblas-dev libblas3 libblkid-dev libbluetooth-dev libbluetooth3
  libboost-atomic1.71-dev libboost-atomic1.71.0 libboost-chrono1.71-dev libboost-chrono1.71.0 libboost-date-time-dev
  libboost-date-time1.71-dev libboost-date-time1.71.0 libboost-dev libboost-filesystem-dev libboost-filesystem1.71-dev
  libboost-filesystem1.71.0 libboost-iostreams-dev libboost-iostreams1.71-dev libboost-iostreams1.71.0
  libboost-locale-dev libboost-locale1.71-dev libboost-locale1.71.0 libboost-regex1.71-dev libboost-regex1.71.0
  libboost-serialization1.71-dev libboost-serialization1.71.0 libboost-system1.71-dev libboost-system1.71.0
  libboost-thread1.71-dev libboost-thread1.71.0 libboost1.71-dev libbrotli-dev libbsh-java libbtf1 libc-dev-bin
  libc6-dev libcairo-script-interpreter2 libcairo2-dev libcamd2 libcamel-1.2-62 libcamel1.2-dev libcc1-0 libccolamd2
  libcdr-0.1-1 libcdr-dev libcdt5 libcgraph6 libcholmod3 libclang1-10 libclass-method-modifiers-perl
  libclucene-contribs1v5 libclucene-core1v5 libclucene-dev libcmis-0.5-5v5 libcmis-dev libcolamd2
  libcommons-logging-java libcommons-parent-java libcppunit-1.15-0 libcppunit-dev libcroco3 libcrypt-dev libctf-nobfd0
  libctf0 libcups2-dev libcupsimage2 libcupsimage2-dev libcurl4-gnutls-dev libcxsparse3 libdatrie-dev libdbus-1-dev
  libdconf-dev libdebhelper-perl libdevel-callchecker-perl libdpkg-perl libdw1 libdynaloader-functions-perl
  libe-book-0.1-1 libe-book-dev libebackend-1.2-10 libebackend1.2-dev libebook-1.2-20 libebook-contacts-1.2-3
  libebook-contacts1.2-dev libebook1.2-dev libedata-book-1.2-26 libedata-book1.2-dev libedataserver-1.2-24
  libedataserver1.2-dev libegl-dev libegl1-mesa-dev libel-api-java libemf1 libencode-locale-perl libeot-dev libeot0
  libepoxy-dev libepubgen-0.1-1 libepubgen-dev libetonyek-0.1-1 libetonyek-dev libexif12 libexpat1-dev
  libexttextcat-2.0-0 libexttextcat-data libexttextcat-dev libfakeroot libfbclient2 libffi-dev libfftw3-double3
  libfile-homedir-perl libfile-listing-perl libfile-stripnondeterminism-perl libfile-which-perl libfontconfig1-dev
  libfontforge3 libfreehand-0.1-1 libfreehand-dev libfreetype-dev libfreetype6-dev libfribidi-dev libgcc-9-dev
  libgck-1-0 libgcr-base-3-1 libgcrypt20-dev libgd3 libgdata-common libgdata22 libgdk-pixbuf2.0-dev libgdraw6
  libgfortran5 libgif7 libgirepository1.0-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libgles2
  libgles2-mesa-dev libglib2.0-dev libglib2.0-dev-bin libglm-dev libglu1-mesa libglu1-mesa-dev libglvnd-dev libglx-dev
  libgmp-dev libgmpxx4ldbl libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev libgnutlsxx28 libgoa-1.0-0b
  libgoa-1.0-common libgomp1 libgpg-error-dev libgpgme-dev libgpgmepp-dev libgphoto2-6 libgphoto2-port12 libgraphblas3
  libgraphite2-dev libgs9 libgs9-common libgssrpc4 libgstreamer-gl1.0-0 libgstreamer-plugins-base1.0-0
  libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgtk-3-dev libgts-0.7-5 libgvc6 libgvpr2 libhamcrest-java
  libharfbuzz-dev libharfbuzz-gobject0 libharfbuzz-icu0 libhsqldb1.8.0-java libhtml-parser-perl libhtml-tagset-perl
  libhtml-tree-perl libhttp-cookies-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libhunspell-dev
  libhyphen-dev libhyphen0 libib-util libice-dev libicu-dev libidn11 libidn2-dev libieee1284-3 libijs-0.35
  libimport-into-perl libio-html-perl libio-pty-perl libio-socket-ssl-perl libipc-run-perl libisl22 libitm1
  libixion-0.15-0 libjbig-dev libjbig2dec0 libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjsp-api-java
  libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9 libkf5attica-dev libkf5auth-dev libkf5auth-dev-bin libkf5auth5
  libkf5bookmarks-dev libkf5codecs-dev libkf5completion-dev libkf5config-dev libkf5config-dev-bin
  libkf5configwidgets-dev libkf5coreaddons-dev libkf5coreaddons-dev-bin libkf5dbusaddons-dev libkf5globalaccel-dev
  libkf5guiaddons-dev libkf5i18n-dev libkf5iconthemes-dev libkf5itemviews-dev libkf5jobwidgets-dev libkf5kio-dev
  libkf5kiofilewidgets5 libkf5service-dev libkf5solid-dev libkf5sonnet-dev libkf5sonnet-dev-bin libkf5textwidgets-dev
  libkf5widgetsaddons-dev libkf5windowsystem-dev libkf5xmlgui-dev libklu1 liblab-gamut1 liblangtag-common
  liblangtag-dev liblangtag-gobject0 liblangtag1 liblapack-dev liblapack3 liblcms2-dev libldap2-dev libldl2 libllvm10
  liblpsolve55-dev liblqr-1-0 liblsan0 libltdl-dev liblwp-mediatypes-perl liblwp-protocol-https-perl liblzma-dev
  libmagick++-6.q16-8 libmagickcore-6.q16-6 libmagickwand-6.q16-6 libmdds-dev libmetis5 libmhash2
  libmodule-runtime-perl libmongoose2 libmoo-perl libmount-dev libmpc3 libmspub-0.1-1 libmspub-dev libmwaw-0.3-3
  libmwaw-dev libmysqlclient-dev libmysqlclient21 libmythes-1.2-0 libmythes-dev libneon27-gnutls libneon27-gnutls-dev
  libnet-http-perl libnet-ssleay-perl libnspr4 libnspr4-dev libnss3 libnss3-dev libodbc1 libodfgen-0.1-1 libodfgen-dev
  libopengl-dev libopengl0 libopenjp2-7 liborc-0.4-0 liborc-0.4-dev liborc-0.4-dev-bin liborcus-0.15-0 liborcus-dev
  liborcus-spreadsheet-model-0.15-0 libp11-kit-dev libpagemaker-0.0-0 libpagemaker-dev libpango1.0-dev
  libpangoxft-1.0-0 libpaper1 libparams-classify-perl libpathplan4 libpcre16-3 libpcre2-32-0 libpcre2-dev
  libpcre2-posix2 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpcsclite1 libphonenumber7 libpixman-1-dev libplot2c2
  libpng-dev libpoppler-cpp-dev libpoppler-cpp0v5 libpoppler-dev libpoppler-private-dev libpoppler97 libpq-dev libpq5
  libprotobuf17 libpsl-dev libpstoedit0c2a libpthread-stubs0-dev libpython3-dev libpython3.8-dev libqgpgme7
  libqt5concurrent5 libqt5script5 libqt5scripttools5 libqt5sql5 libqt5x11extras5-dev libquadmath0 libraptor2-0
  libraptor2-dev librasqal3 librasqal3-dev librbio2 librdf0 librdf0-dev librevenge-0.0-0 librevenge-dev
  librole-tiny-perl libsane libsane-common libsane-dev libsecret-1-0 libsecret-1-dev libsecret-common libselinux1-dev
  libsepol1-dev libservlet-api-java libservlet3.1-java libsm-dev libsnmp-base libsnmp35 libsoup2.4-dev libspiro1
  libspqr2 libsqlite3-dev libssl-dev libstdc++-9-dev libstrictures-perl libsub-override-perl libsub-quote-perl
  libsuitesparse-dev libsuitesparseconfig5 libtasn1-6-dev libthai-dev libtiff-dev libtiffxx5 libtimedate-perl
  libtommath1 libtool libtry-tiny-perl libtsan0 libubsan1 libumfpack5 libunbound8 libuninameslist1 liburi-perl
  libvisio-0.1-1 libvisio-dev libvulkan-dev libwayland-bin libwayland-dev libwebpmux3 libwebsocket-api-java
  libwpd-0.10-10 libwpd-dev libwpg-0.3-3 libwpg-dev libwps-0.4-4 libwps-dev libwww-perl libwww-robotrules-perl
  libx11-dev libx11-xcb-dev libxapian30 libxau-dev libxaw7-dev libxcb-icccm4-dev libxcb-render0-dev libxcb-shm0-dev
  libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev
  libxi-dev libxinerama-dev libxkbcommon-dev libxkbfile-dev libxml2-dev libxml2-utils libxmlsec1-dev libxmlsec1-gcrypt
  libxmlsec1-gnutls libxmlsec1-nss libxmu-dev libxmu-headers libxpm-dev libxrandr-dev libxrender-dev libxslt1-dev
  libxt-dev libxtst-dev libyajl-dev libyajl2 libzip5 linux-libc-dev lp-solve m4 make maven-repo-helper mysql-common
  nettle-dev odbcinst odbcinst1debian2 openjdk-11-jdk openjdk-11-jdk-headless openjdk-11-jre openjdk-11-jre-headless
  pango1.0-tools patchutils perl-openssl-defaults pkg-config po-debconf poppler-data pstoedit python3-dev python3-lxml
  python3-mako python3-markdown python3-packaging python3-pyparsing python3.8-dev qt5-qmake qt5-qmake-bin qtbase5-dev
  qtbase5-dev-tools qtchooser qtscript5-dev rdfind symlinks ucpp unixodbc-dev unzip uuid-dev wayland-protocols wdiff
  x11proto-core-dev x11proto-dev x11proto-input-dev x11proto-randr-dev x11proto-record-dev x11proto-xext-dev
  x11proto-xinerama-dev xorg-sgml-doctools xsltproc xtrans-dev zip zlib1g-dev
0 upgraded, 593 newly installed, 0 to remove and 0 not upgraded.
Need to get 499 MB of archives.
After this operation, 1707 MB of additional disk space will be used.
Do you want to continue? [Y/n]

이제, 리브레오피스(LibreOffice)를 빌드(Build)할 준비가 되었습니다.

Buy me a coffeeBuy me a coffee

이번 2020년 NIPA에서 진행하는 컨트리뷰톤LibreOffice 한국어 사용성 향상 및 공헌자 양성 프로젝트 멘토링을 위해서, Windows 빌드를 어떻게 할까 고민을 하였습니다.

고민 끝에, 이전에 새로 분양을 받은 HP 랩탑을 Windows를 쓰는 걸로 결론을 내렸습니다.

그래서, 새로 받은 HP 랩탑에 Windows 10설정을 하였고 이제 리브레오피스(LibreOffice)를 빌드하도록 진행을 하였습니다.

저는 여태껏 리눅스(Linux)와 맥OSX(Mac OSX)에서만 리브레오피스(LibreOffice)빌드를 하였습니다.
주로 리눅스와 맥을 사용하는 사람이라 보니, 윈도우(Windows)에서 리브레오피스 빌드는 아주 생소하게 느껴집니다.

(저, 참고로 첫직장에서 사회생활할때 SI용역으로 MFC 어플리케이션 개발하고, Windows API로 삽질하고, C#, ASP.NET으로 밥벌이한 사람입니다. 그때 Python으로도 개발을 해보고 Java로도 개발을 해보고... 오픈소스 활동한다고 해도 닥치는대로 개발해보는 잡부인생은 사회생활 첫시작부터 ㅎㅎ )

각설하고, 문서재단(The Document Foundation)의 Building LibreOffice on Windows with Cygwin and MSVC: Tips and Tricks 를 보고 리브레오피스(LibreOffice)빌드를 따라해보았습니다.

문서 읽고, 우선 제일 먼저 해야할일

  • MS사의 Visual Studio 2019 설치 (이 글을 쓰는 당시에 최신이 Visual Studio 2019)
  • 빌드를 위한 Windows 10 SDK 설치하기
  • Visual Studio와 Windows 10 SDK 설치후, Visual Studio 언어설정을 무조건 영어(English)로 설정하기
  • 자바(Java)를 빌드할 openJDK버전 설치 AdoptOpenJDK 설치함
  • Cygwin 설치 및 빌드 툴 설치

위의 4가지만 하면 그래도 큰 난관은 돌파합니다.

Linux환경을 모른다면 Cygwin에서 빌드하는건 정말 엄청 어려울듯한?

실제로 윈도우(Windows)환경에서 리브레오피스(LibreOffice)를 빌드해보니, 엄청난 시행착오를 겪어보며, 구글링(Googling)과 IRC문의로 문제를 해결하였습니다.

Cygwin에서 빌드 스크립트 (Visual Studio 2019의 컴파일로로 빌드하도록 설정하였습니다.

 /cygdrive/c/sources/libo-core/autogen.sh \
               --with-external-tar=/cygdrive/c/sources/lo-externalsrc \
               --with-junit=/cygdrive/c/sources/junit-4.10.jar \
               --with-ant-home=/cygdrive/c/sources/apache-ant-1.9.5 \
               --enable-pch --disable-ccache \
               --with-locales=ko -
               -with-vendor=me \
               --with-lang=ko \
               --enable-dbgutil \
                --disable-skia \
               --with-jdk-home="/cygdrive/c/Program Files/AdoptOpenJDK/jdk-14.0.1.7-openj9/" \
               --enable-64-bit \
               --with-visual-studio=2019 \
               --disable-odk

빌드 중 에러, Skia는 Clang(llvm)이 필요하나 현재 cygwin에서 설치를 했으나 인식을 못하는듯
그래서 빌드시 skia 미지원으로 빌드하도록 변경

checking whether to build Skia... yes checking for clang-cl... no configure: error: Clang compiler not found. The Skia library needs to be built using Clang. Error running configure at /cygdrive/c/sources/libo-core/autogen.sh line 299.

안티바이러스 끄기를 해야 빌드 설정이 진행되더군요.

cat: 'C:/sources/libo-core/eicar': Permission denied configure: error: Exclude the build and source directories associated with LibreOffice in the following Antivirus software: *Windows Defender Error running configure at /cygdrive/c/sources/libo-core/autogen.sh line 299.
Windows10에서 안티바이러스 끄기는 업데이트 및 보안선택 -> Windows 보안선택 -> 바이러스 및 위협방지 클릭

실시간 감지를 끕니다. 그래야 빌드를 시도할 수 있습니다.

빌드 설정이 끝나면 아래와 같은 메세지를 확인할 수 있습니다.

To build, run:
C:/cygwin64/opt/lo/bin/make

To view some help, run:
C:/cygwin64/opt/lo/bin/make help

이제, 아래의 명령어로 빌드를 진행해봅니다

$ /opt/lo/bin/make clean gb_COLOR=1

이후, 빌드를 하려니 또 오류가 나오더군요.

아래 오류를 보니, 왜 빌드가 안되지 하며 이해가 안되어 머리가 아팠습니다.
msvcprtd.lib(MSVCP100D.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

구글링을 한 결과 아래의 글을 확인하였습니다.

MSVC 2015's broken static initializer_list causing build failure

http://document-foundation-mail-archive.969070.n3.nabble.com/MSVC-2015-s-broken-static-initializer-list-causing-build-failure-td4202928.html

 

Dev - MSVC 2015's broken static initializer_list causing build failure

On Sun, 2017-02-19 at 20:53 +0000, Luke Benes wrote: > config_host.mk: > export UCRTSDKDIR=C:/PROGRA~2/WI3CF2~1/10/ > export UCRTVERSION=10.0.10240.0 > > Looking at the creation date of that folder, it matches the creation >  date of C:\Program Files (x86

document-foundation-mail-archive.969070.n3.nabble.com

확인 결과, Windows10 OS에 Visual Studio 2019 설치 및 cygwin으로 빌드 설정만 하였지, 정작 빌드를 위한 Windows 10 SDK 가 설치가 되지 않아 생기던 버그더군요.

아래 링크로 Windows 10 SDK를 설치합니다

https://developer.microsoft.com/ko-kr/windows/downloads/windows-10-sdk/

 

Windows 10 SDK - Windows 앱 개발

Windows 10 SDK Windows 10, 버전 2004용 Windows 10 SDK(10.0.19041.0)는 Windows 10 앱을 빌드하는 데 필요한 최신 헤더, 라이브러리, 메타데이터 및 도구를 제공합니다. 이 SDK를 사용하여 Windows 10, 버전 2004 및 이�

developer.microsoft.com

설치가 완료되면 이제 제대로 빌드가 진행됩니다.

리브레오피스(LibreOffice)빌드하는데 꽤 시간 걸리니, 자기전에 돌리는 것이 속이 편합니다.

만약에, Visual Studio와 Windows 10 SDK 설치후, Visual Studio 언어설정을 무조건 영어(English)로 설정하기를 하지 않으면 nss 라이브러리 컴파일하다 오류가 납니다.

만약, cl.exe를 실행하여 한글이 나온다고 하면

C:\Users\****>"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe"
Microsoft (R) C/C++ 최적화 컴파일러 버전 19.26.28806(x64)
Copyright (c) Microsoft Corporation. All rights reserved.

사용법: cl [ option... ] filename... [ /link linkoption... ]

다음과 같이, Visual Studio의 언어설정을 영어(English)로 바꿔서, cl.exe가 영어로 나오도록 변경 한후에 LibreOffice빌드를 해야합니다. 

C:\Users\****>"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe"
Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

 

참고로, Visual Studio의 언어설정을 영어(English)로 바꾸려면, Visual Studio Installer를 실행 후 "영어"언어팩을 설치해야합니다.

아래는 러시아어(Russian Language)에서 Visual Studio 언어팩 설정 화면입니다.

https://imgur.com/PnNB7Li

 

Imgur

 

imgur.com

 

위의 빌드 오류 이슈에 대해서 LibreOffice의 #libreoffice-dev채널에서 아래의 링크를 이용하여 문의를 하였습니다.

Friday, June 12th, 2020
Hello 12:30 AM I have a question for windows build. 12:31 AM Now, I build LibreOffice on Windows. After setting building environment (Cygwin). During building, It shows error message 12:31 AM [coreconf/rules.mk:44: lib] Error 2 12:31 AM out\nssutil3.lib □□□̺귯□□ □□ out\nssutil3.exp 12:32 AM [C:/sources/libo-core/external/nss/ExternalProject_nss.mk:21: C:/build/workdir/ExternalProject/nss/build] Error 1
mst___: please use pastebin

dhsung: https://pastebin.com/7s2GXkxL
https://pastebin.com/7s2GXkxL

 

[Bash] LibreOffice build error on Windows & Cygwin - Pastebin.com

Not a member of Pastebin yet? Sign Up, it unlocks many cool features! /cygdrive/c/build $   /cygdrive/c/sources/libo-core/autogen.sh --with-external-tar=/cygdrive/c/sources/lo-externalsrc  --with-junit=/cygdrive/c/sources/junit-4.10.jar  --with-ant-home

pastebin.com

mst___: it looks like when building nss, /FS parameter is missing in the command line for pkix_pl_pk11certstore.c
dhsung: Hmm, How to add the /FS parameter at autogen.sh?
mst___: can you pastebin the command line that invokes cl.exe on pkix_pl_pk11certstore.c ?
https://pastebin.com/nSx0sKkw

 

[Bash] LibreOffice compile error msg about nss build - Pastebin.com

 

pastebin.com

mst___: ah... probably the cause is the syntax error in /usr/bin/sh: -c: line 0: `expr Microsoft(R) \> 1600 \| Microsoft(R) = 1600 \& C/C++ \>= 40219'

dhsung: hmm, I checked the env, It shows LANG=ko_KR.UTF-8@cjknarrow

mikekaganski: out of interest: what does 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe' output for you in the console? 1:21 AM you might want to file a bug against NSS with that information ;-) 1:21 AM — mikekaganski used his path to cl.exe, naturally dhsung_ might need to adjust

cl.exe (Korean)

https://pastebin.com/XNRVYfiy

 

cl.exe (Korean version) - Pastebin.com

Not a member of Pastebin yet? Sign Up, it unlocks many cool features! C:\Users\dhsung>"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe" Microsoft (R) C/C++ 최적화 컴파일러 버전 19.26.2

pastebin.com

— mikekaganski has "Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28806 for x64" in the first line
mikekaganski: anyway, I'd suggest you to re-run VS installer, and only select en-US UI 1:42 AM no need to reinstall 1:42 AM just run its installer and modify install set 1:44 AM dhsung_: https://imgur.com/PnNB7Li
https://imgur.com/PnNB7Li

 

Imgur

 

imgur.com

참고: nss library

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Building

 

Building NSS

This page has detailed information on how to build NSS. Because NSS is a cross-platform library that builds on many different platforms and has many options, it may be complex to build. Please read these instructions carefully before attempting to build.

developer.mozilla.org

리브레오피스에서 윈도우(Windows)환경의 Visual Studio 2019에서 빌드 하기 

https://wiki.documentfoundation.org/Development/BuildingOnWindows#Visual_Studio_2019

 

Building LibreOffice on Windows with Cygwin and MSVC: Tips and Tricks - The Document Foundation Wiki

Build dependencies Before you can start hacking LibreOffice on Windows, you need to follow these instructions to set up a build environment. Do also read our generic building hints. Install Visual Studio You need the Microsoft compiler/development suite Vi

wiki.documentfoundation.org

아래 영어에 적힌 내용처럼, cygwin 쉘에서는 인코딩 집합과 맞지 않아 빌드 오류인 경우가 많으니, 리브레오피스를 윈도우환경의 cygwin에서 빌드시, Visual Studio설정을 영어로 된 UI로 설정을 해야 한다고 나와 있습니다.
Note: Visual Studio command-line tools use system OEM codepage to output messages to console, when corresponding UI language is installed as part of Visual Studio installation. The OEM codepage on Windows depends on system locale defined using "Language for non-Unicode programs" in intl.cpl applet (description of the setting), and is often incompatible with encoding set in cygwin shell (typically UTF-8). This garbles the output from the tools in the build log. You might want to make sure that you only install English UI when installing Visual Studio to avoid that problem.

빌드가 완료되면 아래와 같은 메세지가 뜹니다.

[RDB] services
[BIN] sc
[MOD] sc
[BIN] postprocess
[GAL] backgrounds
[GAL] sounds
[MOD] postprocess
[ULF] C:/build/workdir/Gallery/sounds/sounds.ulf
[STR] sounds/sounds
[PKG] Gallery/sounds
[ULF] C:/build/workdir/Gallery/backgrounds/backgrounds.ulf
[STR] backgrounds/backgrounds
[PKG] Gallery/backgrounds
[BIN] extras
[MOD] extras
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only

리브레오피스(LibreOffice) 윈도우 빌드가 완료되었으니 실행을 해봐야겠지요?

아래의 명령어로 실행을 해봅니다!

$ ./instdir/program/soffice.exe

리브레오피스(LibreOffice) 실행을 하면 아래와 같은 시작 스플레쉬(Splash) 화면이 나오면서 프로그램이 로딩됩니다.

리브레오피스(LibreOffice) 로딩이 되며 시작 스플레시가 꺼지면 다음과 같이 시작화면이 나옵니다.

리브레오피스(LibreOffice)의 정보를 확인하면 아래와 같이 나타납니다.

그리고, 한글(HWP)와 MS워드 격인 리브레오피스(LibreOffice)의 라이터(Writer)를 실행해보았습니다.

글이 제대로 써지는지 확인하였습니다.

엄청난 시행착오를 겪은 후에, 결국은 빌드 및 실행을 해보았습니다.

이제부터, 소프트웨어 번역(飜譯, Translation)와 Wiki 번역 (飜譯, Translation)을 해봐야겠습니다.

Buy me a coffeeBuy me a coffee

오랜만에, 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

실행 후 화면

Buy me a coffeeBuy me a coffee

원래 Arm기반CPU에 탑재되는 Android OS를 X86기반의 CPU에도 작동할수 있게 포팅하는 프로젝트인 Android-x86 프로젝트 사이트(http://www.android-x86.org/)에서 x86기반의 안드로이드 소스(여기서는 Gingerbread)를 받고 난 후 빌드 하였다 

make iso_img TARGET_PRODUCT=generic_x86

빌드후에 에러 나는 점을 검색해서 문제 해결한 부분 링크를 붙였다.

결국 빌드는 완료했고 kvm위에서 실행해보았으나 원하는 시험 결과가 나오지 않아 실망했음.

 

dalvik/vm/native/dalvik_system_Zygote.cpp: In function 'int setrlimitsFromArray(ArrayObject*)':
dalvik/vm/native/dalvik_system_Zygote.cpp:194: error: aggregate 'rlimit rlim' has incomplete type and cannot be defined
dalvik/vm/native/dalvik_system_Zygote.cpp:217: error: 'setrlimit' was not declared in this scope
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....

 Fix for Dalvik compile error on CyanogenMod 9

 

  CC      arch/x86/kernel/ptrace.o
/home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:1366:17: error: conflicting types for ‘syscall_trace_enter’
In file included from /home/dhsung/android-x86/kernel/arch/x86/include/asm/vm86.h:130:0,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/processor.h:10,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/thread_info.h:22,
                 from /home/dhsung/android-x86/kernel/include/linux/thread_info.h:53,
                 from /home/dhsung/android-x86/kernel/include/linux/preempt.h:9,
                 from /home/dhsung/android-x86/kernel/include/linux/spinlock.h:50,
                 from /home/dhsung/android-x86/kernel/include/linux/seqlock.h:29,
                 from /home/dhsung/android-x86/kernel/include/linux/time.h:8,
                 from /home/dhsung/android-x86/kernel/include/linux/timex.h:56,
                 from /home/dhsung/android-x86/kernel/include/linux/sched.h:57,
                 from /home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:8:
/home/dhsung/android-x86/kernel/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of ‘syscall_trace_enter’ was here
/home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:1411:17: error: conflicting types for ‘syscall_trace_leave’
In file included from /home/dhsung/android-x86/kernel/arch/x86/include/asm/vm86.h:130:0,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/processor.h:10,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/thread_info.h:22,
                 from /home/dhsung/android-x86/kernel/include/linux/thread_info.h:53,
                 from /home/dhsung/android-x86/kernel/include/linux/preempt.h:9,
                 from /home/dhsung/android-x86/kernel/include/linux/spinlock.h:50,
                 from /home/dhsung/android-x86/kernel/include/linux/seqlock.h:29,
                 from /home/dhsung/android-x86/kernel/include/linux/time.h:8,
                 from /home/dhsung/android-x86/kernel/include/linux/timex.h:56,
                 from /home/dhsung/android-x86/kernel/include/linux/sched.h:57,
                 from /home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:8:
/home/dhsung/android-x86/kernel/arch/x86/include/asm/ptrace.h:147:13: note: previous declaration of ‘syscall_trace_leave’ was here
make[4]: *** [arch/x86/kernel/ptrace.o] 오류 1
make[3]: *** [arch/x86/kernel] 오류 2
make[2]: *** [arch/x86] 오류 2
make[1]: *** [sub-make] 오류 2
make[1]: Leaving directory `/home/dhsung/android-x86/kernel'
make: *** [out/target/product/generic_x86/kernel] 오류 2

https://patchwork.kernel.org/patch/1301031/

 

external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:   required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: note: use ‘this->SetState’ instead
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: use ‘this->SetState’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] 오류 1


http://review.android.git.linaro.org/#/c/1983/

 

frameworks/base/tools/aapt/AaptAssets.cpp:1386:41:   required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptGroup> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp<AaptDir>]’:
frameworks/base/tools/aapt/AaptAssets.cpp:1445:53:   required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] 오류 1


http://stackoverflow.com/questions/10171897/building-android-source-code


target Generated: libwebcore <= external/webkit/WebCore/xml/XMLHttpRequestUpload.idl
target Generated: libwebcore <= external/webkit/WebCore/xml/XMLSerializer.idl
target Generated: libwebcore <= external/webkit/WebCore/xml/XSLTProcessor.idl
target Generated: libwebcore <= external/webkit/WebCore/dom/make_names.pl
Unknown parameter a interfaceName for tags/attrs
make: *** [out/target/product/generic_x86/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h] 오류 255

http://forum.xda-developers.com/showthread.php?t=1610907


https://github.com/CyanogenMod/android_external_webkit/commit/1c88029b864c88cc32767eb8d1ffe13e95445af3


In file included from dalvik/vm/Dalvik.h:87:0,
                 from dalvik/vm/native/dalvik_system_Zygote.c:20:
dalvik/vm/oo/ObjectInlines.h: In function ‘dvmSetObjectArrayElement’:
dalvik/vm/oo/ObjectInlines.h:29:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setgroupsIntarray’:
dalvik/vm/native/dalvik_system_Zygote.c:172:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setrlimitsFromArray’:
dalvik/vm/native/dalvik_system_Zygote.c:192:19: error: storage size of ‘rlim’ isn’t known
dalvik/vm/native/dalvik_system_Zygote.c:200:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:204:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:215:9: warning: implicit declaration of function ‘setrlimit’ [-Wimplicit-function-declaration]
dalvik/vm/native/dalvik_system_Zygote.c:192:19: warning: unused variable ‘rlim’ [-Wunused-variable]
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] 오류 1

https://gist.github.com/alanorth/3158845


Notice file: system/core/libmincrypt/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libmincrypt.a.txt
Install: out/host/linux-x86/bin/mkbootimg
host C: mksdcard <= sdk/emulator/mksdcard/mksdcard.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
sdk/emulator/mksdcard/mksdcard.c:1:0: note: this is the location of the previous definition
host Executable: mksdcard (out/host/linux-x86/obj/EXECUTABLES/mksdcard_intermediates/mksdcard)
true
Notice file: sdk/emulator/mksdcard/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/mksdcard.txt
Install: out/host/linux-x86/bin/mksdcard
host Prebuilt: mkuserimg.sh (out/host/linux-x86/obj/EXECUTABLES/mkuserimg.sh_intermediates/mkuserimg.sh)
Notice file: system/extras/ext4_utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/mkuserimg.sh.txt
Install: out/host/linux-x86/bin/mkuserimg.sh
host Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)
Install: out/host/linux-x86/bin/monkeyrunner
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
frameworks/base/tools/obbtool/Main.cpp:1:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] 오류 1



This happens with commit: a5158b31d97e25832d778a41a31df6ece0fc627e[Ubuntu 11.10 x86_64 running Linux 3.0.0-12-generic]Fix is same build/core/combo/HOST_linux-x86.mk:    -HOST_GLOBAL_CFLAGS  = -D_FORTIFY_SOURCE=0     HOST_GLOBAL_CFLAGS  = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0[linenumber 59] ------------There are much of:  warning: _FORTIFY_SOURCE redefinedBut this frameworks/base/tools/obbtool/Main.cpp is compiled with -Werror 


http://codewalkerster.blogspot.kr/2011/11/ubuntu-1110-androidgingerbread-build.html

https://code.google.com/p/android/issues/detail?id=20795

 

위의 빌드 에러 다 처리하고 빌드하는데 하루종일 걸린것 같다. (실은 자기 전에 빌드 돌렸는데, 빌드 에러나서 계속 실행되지 않았던거 -_-; 자고 일어나서 화면을 보니 하루만에 빌드될것이 빌드가 되지 않아 울뻔했었다.

회사에서 빌드 로그 쭉보면서 다른 컴퓨터를 통해 업무보느라 정신이 거의 어질어질했음 -_-

ps. 안드로이드 빌드 완료될때는 기분이 좋으나, 빌드 에러 날때는 짜증 ㅠㅠ

Buy me a coffeeBuy me a coffee

2013년 7월 25일 목요일 저녁즈음


안드로이드 소스를 받았겠다, 컴파일을 하고 책보고 인터넷 서핑을 했습니다.

그리고 잠깐 모니터링을 하다, 안드로이드 소스 빌드중 아래와 같은 에러가 발생하고는 빌드가 중단되었습니다 -_-;;

dalvik/vm/native/dalvik_system_Zygote.cpp: In function 'int setrlimitsFromArray(ArrayObject*)':
dalvik/vm/native/dalvik_system_Zygote.cpp:194: error: aggregate 'rlimit rlim' has incomplete type and cannot be defined
dalvik/vm/native/dalvik_system_Zygote.cpp:217: error: 'setrlimit' was not declared in this scope
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....


위의 빌드 중단 해결하는 방법을 구글링하니 헤더파일을 추가하는게 나왔습니다.

위의 링크에서는 에러가 난 dalvil_system_Zagote.cpp파일에 #include <sys/resource.h>를 추가해주면 빌드가 잘 된다고 나왔습니다.

위의 글을 믿고 cpp파일에

#include <sys/resource.h>

헤더파일 추가를 했습니다.    

아래는 헤더파일 추가된 소스파일 캡쳐화면.



위의 링크에 나온것 처럼 헤더파일 포함을 했더니 빌드가 잘됩니다~



Buy me a coffeeBuy me a coffee

2010년 6월 24일 오전 0시 21분경 모님과 IRC채널에서 대화하다


<blueguy^> OddEgo / htc 갔더니..
<blueguy^> OddEgo / desire 커널 소스 공개 되어 있더군요.
<OddEgo> 우와
<OddEgo> 커널 소스 공개되어서 xda 분들이 롬을 올리군요... ㅎㄸ
<blueguy^> OddEgo / 이미지 새로 올리는데 만족하지 말고..
<blueguy^> 직접 한번 빌드해서 올려 보는 것이..
<blueguy^> 흐흐.
<OddEgo> virtualbox에 올리면 능력자가 되는건가요?!
<OddEgo> 이미지 새로 올리는데 만족하지 말고.. // 어떻게 정곡을 잘 찌르십니까? ㅎㅎ
<blueguy^> OddEgo / 버박에 올리면 능력자가. 될 듯.
<blueguy^> 흐흐.
<blueguy^> qemu에는 그냥 올릴 수 있어요.


htc에서 공개된 안드로이드 소스코드를 x86용으로 포팅해서 올리면 엄청난 굇수가 되어 있겠지?

Buy me a coffeeBuy me a coffee

+ Recent posts