>

그래서 CFW Nintendo 3DS 용 Homebrew 앱을 컴파일하려고합니다. Linux Mint 18.2에서하고 있습니다. 컴파일러가 필요한 종속성을 컴파일하지 못했습니다.

컴파일러의 코드는 다음과 같습니다.

#!/bin/sh
set -ex
mkdir -p build
# Install libarchive and libmpg123 for host
apt-get update
apt-get -y install libarchive-dev libmpg123-dev
# Install libarchive for 3ds
git clone https://github.com/Cruel/3ds_portlibs.git
cd 3ds_portlibs
make zlib
make install-zlib
make libarchive
make install
# Install libmpg123 for 3ds
wget -O libmpg123-dev.tar.gz  https://notabug.org/attachments/216a6d61-f167-4f65-84dc-fa98c2247fc1
tar -xaf libmpg123-dev.tar.gz -C $DEVKITPRO/portlibs/3ds
cd ../build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_EMULATOR=ON -DBUILD_TESTS=ON ..
make -j4

다음은 출력 오류입니다.

+ mkdir -p build
+ apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://deb.torproject.org/torproject.org xenial InRelease
Hit:7 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial InRelease
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:10 http://ppa.launchpad.net/jonathonf/ffmpeg-3/ubuntu xenial InRelease
Hit:6 http://screenshots.getdeb.net xenial-getdeb InRelease
Get:11 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Ign:12 http://packages.linuxmint.com sonya InRelease
Hit:13 http://packages.linuxmint.com sonya Release
Hit:15 http://archive.canonical.com/ubuntu xenial InRelease
Fetched 204 kB in 5s (38.6 kB/s)
Reading package lists...
+ apt-get -y install libarchive-dev libmpg123-dev
Reading package lists...
Building dependency tree...
Reading state information...
libmpg123-dev is already the newest version (1.22.4-1).
libarchive-dev is already the newest version (3.2.1-2~ubuntu16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
+ git clone https://github.com/Cruel/3ds_portlibs.git
Cloning into '3ds_portlibs'...
+ cd 3ds_portlibs
+ CFLAGS=-m64
+ make zlib
wget -O zlib-1.2.8.tar.gz "http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz"
--2017-08-02 08:47:03--  http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.gz
Resolving prdownloads.sourceforge.net (prdownloads.sourceforge.net)... 216.34.181.59
Connecting to prdownloads.sourceforge.net (prdownloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz [following]
--2017-08-02 08:47:03--  http://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
Connecting to downloads.sourceforge.net (downloads.sourceforge.net)|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://versaweb.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz [following]
--2017-08-02 08:47:04--  https://versaweb.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
Resolving versaweb.dl.sourceforge.net (versaweb.dl.sourceforge.net)... 104.238.205.251
Connecting to versaweb.dl.sourceforge.net (versaweb.dl.sourceforge.net)|104.238.205.251|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 571091 (558K) [application/x-gzip]
Saving to: ‘zlib-1.2.8.tar.gz’
2017-08-02 08:47:04 (1.95 MB/s) - ‘zlib-1.2.8.tar.gz’ saved [571091/571091]
Using ar
Checking for arm-none-eabi-gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Makefile:195: recipe for target 'zlib' failed
make: *** [zlib] Error 1

zlib에 대한 줄을 제거하면 다른 오류가 발생합니다.

+ export CPP3DS=/home/eddy/Documents/FreeShop/cpp3ds
+ for dev in ''\''arc13'\'''
+ cd /home/eddy/Documents/FreeShop/arc13/freeshop
+ for dx in '"3ds_portlibs"' '"build"'
+ '[' -d 3ds_portlibs ']'
+ rm -r 3ds_portlibs
+ for dx in '"3ds_portlibs"' '"build"'
+ '[' -d build ']'
+ rm -r build
+ mkdir -p build
+ export CC=arm-none-eabi-gcc
+ CC=arm-none-eabi-gcc
+ export CXX=arm-none-eabi-g++
+ CXX=arm-none-eabi-g++
+ apt-get update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://deb.torproject.org/torproject.org xenial InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable Release
Ign:4 http://packages.linuxmint.com sonya InRelease
Hit:5 http://packages.linuxmint.com sonya Release
Hit:6 http://ppa.launchpad.net/alessandro-strada/ppa/ubuntu xenial InRelease
Hit:7 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:8 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:12 http://archive.canonical.com/ubuntu xenial InRelease
Hit:13 http://ppa.launchpad.net/jonathonf/ffmpeg-3/ubuntu xenial InRelease
Hit:14 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:10 http://screenshots.getdeb.net xenial-getdeb InRelease
Hit:15 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
+ apt-get -y install libarchive-dev libmpg123-dev
Reading package lists...
Building dependency tree...
Reading state information...
libmpg123-dev is already the newest version (1.22.4-1).
libarchive-dev is already the newest version (3.2.1-2~ubuntu16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
+ git clone https://github.com/Cruel/3ds_portlibs.git
Cloning into '3ds_portlibs'...
+ cd 3ds_portlibs
+ make CC=DEVKITPRO
Please choose one of the following targets:
  freetype (requires zlib to be installed)
  libexif
  libjpeg-turbo
  libpng (requires zlib to be installed)
  sqlite
  zlib
  mxml
  expat
  libxml2
  jansson
  physfs (requires zlib to be installed)
  libmad
  libogg
  libvorbis (requires libogg to be installed)
  giflib
  libconfig
  bzip2
  xz
  libarchive
  nettle
  wslay
+ make libarchive
wget -O libarchive-3.1.2.tar.gz "http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz"
--2017-08-02 16:36:34--  http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz
Resolving www.libarchive.org (www.libarchive.org)... 2600:9000:2025:5a00:16:e6b0:f440:93a1, 2600:9000:2025:fe00:16:e6b0:f440:93a1, 2600:9000:2025:2600:16:e6b0:f440:93a1, ...
Connecting to www.libarchive.org (www.libarchive.org)|2600:9000:2025:5a00:16:e6b0:f440:93a1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4527540 (4.3M) [application/x-gzip]
Saving to: ‘libarchive-3.1.2.tar.gz’
2017-08-02 16:36:40 (54.6 MB/s) - ‘libarchive-3.1.2.tar.gz’ saved [4527540/4527540]
patching file libarchive/archive_ppmd7.c
patching file libarchive/archive_read_disk_posix.c
patching file libarchive/archive_write_disk_posix.c
patching file libarchive/archive_write_set_format_iso9660.c
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-none-eabi
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/eddy/Documents/FreeShop/arc13/freeshop/3ds_portlibs/libarchive-3.1.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
Makefile:274: recipe for target 'libarchive' failed
make: *** [libarchive] Error 77

오류로 판단하면 64 비트 시스템에서 ARM 응용 프로그램을 컴파일하는 중이므로 그로 인해 실패합니다. 그러나 Nintendo 3DS에 설치되어 있기 때문에 ARM에서 소스 코드를 컴파일해야합니다. 애플리케이션을 컴파일하기 위해이 오류를 어떻게 해결합니까?

편집 : 루트에 대한 컴파일러 설정을 시도했는데이 오류가 발생했습니다 :

-- Check for working C compiler: /opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc -- broken
CMake Error at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc" is not able
  to compile a simple test program.
  It fails with the following output:
   Change Dir: /home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeTmp

  Run Build Command:"/usr/bin/make" "cmTC_ef3eb/fast"
  /usr/bin/make -f CMakeFiles/cmTC_ef3eb.dir/build.make
  CMakeFiles/cmTC_ef3eb.dir/build
  make[1]: Entering directory
  '/home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeTmp'
  Building C object CMakeFiles/cmTC_ef3eb.dir/testCCompiler.c.o
  /opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc -o
  CMakeFiles/cmTC_ef3eb.dir/testCCompiler.c.o -c
  /home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTC_ef3eb
  /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ef3eb.dir/link.txt
  --verbose=1
  /opt/devkitPro/devkitARM/bin/arm-none-eabi-gcc
  CMakeFiles/cmTC_ef3eb.dir/testCCompiler.c.o -o cmTC_ef3eb -rdynamic
  arm-none-eabi-gcc: error: unrecognized command line option '-rdynamic'
  CMakeFiles/cmTC_ef3eb.dir/build.make:97: recipe for target 'cmTC_ef3eb'
  failed
  make[1]: *** [cmTC_ef3eb] Error 1
  make[1]: Leaving directory
  '/home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeTmp'
  Makefile:126: recipe for target 'cmTC_ef3eb/fast' failed
  make: *** [cmTC_ef3eb/fast] Error 2


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)

-- Configuring incomplete, errors occurred!
See also "/home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeOutput.log".
See also "/home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeError.log".

또한이 오류가 발생합니다 :

-- strip: /opt/devkitPro/devkitARM/bin/arm-none-eabi-strip - found
-- 3dslink: /opt/devkitPro/devkitARM/bin/3dslink - found
-- Looking for Picasso...
-- Picasso: /opt/devkitPro/devkitARM/bin/picasso - found
-- Looking for nihstro...
-- nihstro - not found
CMake Error at /home/eddy/Documents/FreeShop/cpp3ds/cmake/template_emu/CMakeLists.txt:1 (find_package):
  By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "Qt5Widgets", but CMake did not find one.
  Could not find a package configuration file provided by "Qt5Widgets" with
  any of the following names:
    Qt5WidgetsConfig.cmake
    qt5widgets-config.cmake
  Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
  "Qt5Widgets_DIR" to a directory containing one of the above files.  If
  "Qt5Widgets" provides a separate development package or SDK, be sure it has
  been installed.

-- Configuring incomplete, errors occurred!
See also "/home/eddy/Documents/FreeShop/arc13/freeshop/build/CMakeFiles/CMakeOutput.log".

  • 답변 # 1

    이 질문에서 유효한 컴파일러를 찾을 수 없어 실패한 것 같습니다.

    한 아키텍처의 코드를 다른 아키텍처에서 컴파일하려면 크로스 컴파일러를 다운로드해야합니다. 이 질문의 단계에 따라 ARM 컴파일러를 얻은 다음 ./configure 를 얻을 수 있습니다.  스크립트는 자체적으로 작동하거나 (크로스 컴파일러를 찾는 것처럼 보임) 다음과 같이 사용할 수 있습니다.

    export CC=arm-linux-gnueabi-gcc
    export CXX=arm-linux-gnueabi-g++
    
    

    ... ./configure 를 실행하기 전에  빌드 시스템의 컴파일러를 설정하려면 ( CC 를 준수한다고 가정)  협약).

    이 작동하지 않으면 일반적인 ARM이 아닌 특정 DS 크로스 컴파일러가 필요할 수 있습니다. 이 사이트를 아직 보지 못했다면 devkitARM 가 있는지 확인하는 것이 좋습니다.  필요한 크로스 컴파일러를 제공합니다.

    수정: 새 결과물을 자세히 보면 make CC=DEVKITPRO 가 표시됩니다. . 이것은 make 를 호출   DEVKITPRO 와 직접  컴파일러로 설정하여 미리 컴파일러를 변경하려는 시도를 무시합니다.

    당신은 DEVKITPRO 를 확인해야합니다  바이너리는 PATH 에서 액세스 할 수 있습니다  -터미널을 열고 DEVKITPRO를 입력하여 실행할 수 있는지 또는 찾을 수 없는지 확인하십시오. 발견되지 않으면 devkitARM 의 지침을 확인하십시오.  페이지가 예상대로 설치되었는지 확인하려면, 특히 echo "export DEVKITPRO=/opt/devkitPro" >> ~/.bashrc 라는 Linux 설치 지시 사항의 행을 참조하십시오. .

    편집 편집: 여기에는 라이브러리 및 툴킷 목록이 있습니다. 프로젝트의 설치 페이지에서 종속성을 찾고 추적하여 설치하십시오.

  • 이전 android - GPS 재생률
  • 다음 javascript - D3js에서 노드를 가리키면 여러 노드의 툴팁 표시