Temat: Błąd w kompilacji

Witam

Próbuje skopilować obraz po TP-Link 1043 v1. Niestety cały czas pojawia się błąd który niestety nie wiem czy jest spowodowany.

Making all in tests
make[6]: Nothing to be done for `all'.
Making all in doc
make[6]: Nothing to be done for `all'.
Making all in tools
Making all in bench
make[7]: Nothing to be done for `all'.
make[7]: Nothing to be done for `all-am'.
make[6]: Nothing to be done for `all-am'.
touch /Volumes/OpenWrt/openwrt/build_dir/host/mpc-1.1.0/.built
CFLAGS="-O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include " CPPFLAGS="-I/Volumes/OpenWrt/openwrt/staging_dir/host/include " CXXFLAGS="" LDFLAGS="-L/Volumes/OpenWrt/openwrt/staging_dir/host/lib " /Library/Developer/CommandLineTools/usr/bin/make  -C /Volumes/OpenWrt/openwrt/build_dir/host/mpc-1.1.0  install
Making install in src
/usr/local/bin/gmkdir -p '/Volumes/OpenWrt/openwrt/staging_dir/host/lib'
/usr/bin/env bash ../libtool   --mode=install /usr/local/bin/ginstall -c   libmpc.la '/Volumes/OpenWrt/openwrt/staging_dir/host/lib'
libtool: install: /usr/local/bin/ginstall -c .libs/libmpc.lai /Volumes/OpenWrt/openwrt/staging_dir/host/lib/libmpc.la
libtool: install: /usr/local/bin/ginstall -c .libs/libmpc.a /Volumes/OpenWrt/openwrt/staging_dir/host/lib/libmpc.a
libtool: install: chmod 644 /Volumes/OpenWrt/openwrt/staging_dir/host/lib/libmpc.a
libtool: install: ranlib /Volumes/OpenWrt/openwrt/staging_dir/host/lib/libmpc.a
make[6]: Nothing to be done for `install-data-am'.
Making install in tests
make[6]: Nothing to be done for `install-exec-am'.
make[6]: Nothing to be done for `install-data-am'.
Making install in doc
make[6]: Nothing to be done for `install-exec-am'.
/usr/local/bin/gmkdir -p '/Volumes/OpenWrt/openwrt/staging_dir/host/share/info'
/usr/local/bin/ginstall -c -m 644 ./mpc.info '/Volumes/OpenWrt/openwrt/staging_dir/host/share/info'
install-info --info-dir='/Volumes/OpenWrt/openwrt/staging_dir/host/share/info' '/Volumes/OpenWrt/openwrt/staging_dir/host/share/info/mpc.info'
Making install in tools
Making install in bench
make[7]: Nothing to be done for `install-exec-am'.
make[7]: Nothing to be done for `install-data-am'.
make[7]: Nothing to be done for `install-exec-am'.
make[7]: Nothing to be done for `install-data-am'.
make[6]: Nothing to be done for `install-exec-am'.
/usr/local/bin/gmkdir -p '/Volumes/OpenWrt/openwrt/staging_dir/host/include'
/usr/local/bin/ginstall -c -m 644 src/mpc.h '/Volumes/OpenWrt/openwrt/staging_dir/host/include'
mkdir -p /Volumes/OpenWrt/openwrt/staging_dir/host/stamp
touch /Volumes/OpenWrt/openwrt/build_dir/host/mpc-1.1.0/.built
touch /Volumes/OpenWrt/openwrt/staging_dir/host/stamp/.mpc_installed
make[3]: Leaving directory `/Volumes/OpenWrt/openwrt/tools/mpc'
time: tools/mpc/compile#13.00#7.11#21.84
make[3]: Entering directory `/Volumes/OpenWrt/openwrt/tools/libelf'
. /Volumes/OpenWrt/openwrt/include/shell.sh; gzip -dc /Volumes/OpenWrt/openwrt/dl/libelf-0.8.13.tar.gz | tar -C /Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/.. -xf -
[ ! -d ./src/ ] || cp -fpR ./src/* /Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13

Applying ./patches/900-fix-undefined-macro-access.patch using plaintext:
patching file lib/elf_repl.h
patching file lib/gelf.h
patching file lib/libelf.h
patching file lib/sys_elf.h.in
touch /Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/.preparedc7cb973335f50d059afec009811c3578_6664517399ebbbc92a37c5bb081b5c53
(cd /Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/; bash ./configure --target=x86_64-apple-darwin20.2.0 --host=x86_64-apple-darwin20.2.0 --build=x86_64-apple-darwin20.2.0 --program-prefix="" --program-suffix="" --prefix=/Volumes/OpenWrt/openwrt/staging_dir/host --exec-prefix=/Volumes/OpenWrt/openwrt/staging_dir/host --sysconfdir=/Volumes/OpenWrt/openwrt/staging_dir/host/etc --localstatedir=/Volumes/OpenWrt/openwrt/staging_dir/host/var --sbindir=/Volumes/OpenWrt/openwrt/staging_dir/host/bin --disable-shared --enable-elf64; )
loading site script /Volumes/OpenWrt/openwrt/include/site/darwin
creating cache ./config.cache
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for a BSD compatible install... /usr/local/bin/ginstall -c
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for ANSI C header files... no
checking for unistd.h... yes
checking for stdint.h... yes
checking for fcntl.h... yes
checking for elf.h... no
checking for sys/elf.h... no
checking for link.h... no
checking for sys/link.h... no
checking if gcc can compile elf.h... no
checking for ar.h... yes
checking for libelf.h... no
checking for nlist.h... yes
checking for gelf.h... no
checking whether to install <libelf.h>, <nlist.h> and <gelf.h>... yes
checking for working const... yes
checking for off_t... yes
checking for size_t... yes
checking size of short... 0
checking size of int... 0
checking size of long... 0
checking size of long long... 0
checking size of __int64... 0
checking for 64-bit integer... no
checking for 32-bit integer... no
configure: error: neither int nor long is 32-bit
make[3]: *** [/Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/.configured] Error 1
make[3]: Leaving directory `/Volumes/OpenWrt/openwrt/tools/libelf'
time: tools/libelf/compile#0.82#0.91#2.00
make[2]: *** [tools/libelf/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenWrt/openwrt'
make[1]: *** [/Volumes/OpenWrt/openwrt/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyyy] Error 2
make[1]: Leaving directory `/Volumes/OpenWrt/openwrt'
make: *** [world] Error 2

2

Odp: Błąd w kompilacji

Sądząc po komunikatach, próbujesz to kompilować na MacOS. Będziesz miał większe lub mniejsze problemy, sugerował bym ci uruchomić maszynę wirtualną ze zwykłym ubuntu i tam to kompilować.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Błąd w kompilacji

Tak to prawda, próbuję to zrobić na MacOS. Dlaczego takie problemy pojawiają się na tym systemie. Jakiś czas temu nie miałem problemów z kompilacją a teraz się pojawiają ??

Czy Kali linux może również być smile

4

Odp: Błąd w kompilacji

Może coś zmienili w źródłach a nie uwzględnili kompilacji na MacOS. Niestety, za wiele ci nie pomogę, mam dokładnie zerowe doświadczenie związane z kompilacją na macu (a może ktoś ma starego macbooka który kurzy mu się w szufladzie i chce się go pozbyć?), więc jak już to musisz uderzyć na forum dla dewelopwerów i spytać się co się dzieje,

O ile kali linux ma wszystko co trzeba do kompilacji smile. Działa na pewno na debianie/ubuntu i pochodnych.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

5

Odp: Błąd w kompilacji

W instrukcji mam zrobić powiązanie, ale do końca nie rozumiem jak smile
Zgodnie z tym co jest napisane poniżej utworzyłem plik env.sh z zawarością jaka jest podana, ale niestety nie wiem  gdzie mam umieścić tą scieżke /Volumes/OpenWrt/env.sh czy to ma być

~/.bash_profile

Create a file called env.sh in /Volumes/OpenWrt This is to allow the utilities we just installed to be used instead of the macOS provided ones.

PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
PATH="/usr/local/opt/gettext/bin:$PATH"
PATH="/usr/local/opt/coreutils/bin:$PATH"
PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
export PATH
When developing do source /Volumes/OpenWrt/env.sh to set up the path variable. This leaves your system in a clean state without symlinking.

Now proceed normally.

6

Odp: Błąd w kompilacji

Ah, wiki openwrt smile. Po prostu, przed kompilacją wpisz w konsoli

source /Volumes/OpenWrt/env.sh

jeżeli tam zrobiłeś ten plik i normalnie rób make itd.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

7

Odp: Błąd w kompilacji

ok dziękuję bardzo

8

Odp: Błąd w kompilacji

I co, działa?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

9

Odp: Błąd w kompilacji

jesczez nie sprawdzałem ponieważ robie obiad niedzialny smile

10 (edytowany przez modelos 2021-01-31 17:23:40)

Odp: Błąd w kompilacji

po zrobieniu tej komemdy takie coś się pojawia

source /Volumes/OpenWrt/env.sh
-bash: PATH: command not found
-bash: PATH: command not found
-bash: PATH: command not found
-bash: PATH: command not found

jeszcze jedno pytanie czy po komendę
make V=s -j1 można zmienić na make V=s -j5 dla 4 rdzeni

11

Odp: Błąd w kompilacji

make -j5

bez V=s. Nie zabrakło Ci tego $PATH na końcu w tym skrypcie?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

12

Odp: Błąd w kompilacji

Niestety taki pojawił się błąd

configure: error: neither int nor long is 32-bit
make[3]: *** [Makefile:55: /Volumes/OpenWrt/openwrt/build_dir/host/libelf-0.8.13/.configured] Error 1
make[3]: Leaving directory '/Volumes/OpenWrt/openwrt/tools/libelf'
time: tools/libelf/compile#1.14#1.18#2.70
make[2]: *** [tools/Makefile:159: tools/libelf/compile] Error 2
make[2]: Leaving directory '/Volumes/OpenWrt/openwrt'
make[1]: *** [tools/Makefile:155: /Volumes/OpenWrt/openwrt/staging_dir/target-mips_24kc_musl/stamp/.tools_compile_yynyynnyyyynyyyyynyynnyyyyyyyyyyyyyyyyyyyynyynynyyyynnyyy] Error 2
make[1]: Leaving directory '/Volumes/OpenWrt/openwrt'
make: *** [/Volumes/OpenWrt/openwrt/include/toplevel.mk:227: world] Error 2

13

Odp: Błąd w kompilacji

Rób więc przez maszynę wirtualną...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

14 (edytowany przez modelos 2021-02-01 14:18:51)

Odp: Błąd w kompilacji

zrobiłem virtualkę i działa smile

ale mam problem openvpn to znaczy klient łączy się ze serwerem, ale jak chce wejść na stronę urządzenia po stronie lan to już jest problem

1. OpenVpn działa po widać go w top
1430  1422 root     R     1208   2%   0% top
1421   759 root     S     1144   2%   0% /usr/sbin/dropbear -F -P /var/run/dropbear.1.pid -p 22 -K 300 -T 3
  110     2 root     IW       0   0%   0% [kworker/0:1]
  920     1 root     S     4200   7%   0% /usr/sbin/openvpn --syslog openvpn(home) --status /var/run/openvpn.home.status --cd /var/etc --config openvpn-home.conf
1332     1 nobody   S     1848   3%   0% /usr/sbin/dnscrypt-proxy /var/etc/dnscrypt-proxy-ns1.conf

a w logach mam coś takiego

Mon Feb  1 14:11:55 2021 xxxxxLS: Initial packet from [AF_INET6]::ffff:3xxxxxx18606, sid=309eee5b b25c4825
Mon Feb  1 14:11:55 2021 xxxx:18606 VERIFY OK: depth=1, C=PL, ST=xxxxx, L=xxxxx, O=xxxxx, OU=xxxxx, CN=xxxxx, name=xxxxx, emailAddress=xxxxxx@wwww
Mon Feb  1 14:11:55 2021 3xxxxxxx:18606 VERIFY OK: depth=0, C=PL, ST=xxxxxx, L=xxxxx, O=xxxxx, OU=xxxx, CN=xxxx, name=xxxxxx, emailAddress=xxxxx@wwww
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_VER=3.git::2952f561
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_PLAT=ios
Mon Feb  1 14:11:55 2021 3 xxxxxxxxxx:18606 peer info: IV_NCP=2
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_TCPNL=1
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_PROTO=2
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_AUTO_SESS=1
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_GUI_VER=net.openvpn.connect.ios_3.2.2-3507
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_SSO=openurl
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 peer info: IV_BS64DL=1
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, 2048 bit RSA
Mon Feb  1 14:11:55 2021 xxxxxxxxxx:18606 [iPhoneM] Peer Connection Initiated with [AF_INET6]::ffff:xxxxxxxxxx
Mon Feb  1 14:11:55 2021 ixxxxx/xxxxxxx:18606 MULTI_sva: pool returned IPv4=10.8.0.6, IPv6=(Not enabled)
Mon Feb  1 14:11:55 2021 ixxxxx/xxxxxxx:18606 MULTI: Learn: 10.8.0.6 -> ixxxxxxxxxxxxxx:18606
Mon Feb  1 14:11:55 2021xxxxxx/xxxx:18606 MULTI: primary virtual IP for iPhoneM/xxxxxxxx:18606: 10.8.0.6
Mon Feb  1 14:11:55 2021 ixxxxxxx/xxxxxxxx:18606 PUSH: Received control message: 'PUSH_REQUEST'
Mon Feb  1 14:11:55 2021 xxxxxxxx/3xxxxxx:18606 SENT CONTROL [iPhoneM]: 'PUSH_REPLY,route 192.168.0.0 255.255.255.0,redirect-gateway def1,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM' (status=1)
Mon Feb  1 14:11:55 2021 iPhoneM/xxxxxxxxxx:18606 Data Channel: using negotiated cipher 'AES-256-GCM'
Mon Feb  1 14:11:55 2021 iPhoneM/xxxxxxxxxx:18606 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mon Feb  1 14:11:55 2021 iPhoneM/xxxxxxxxxx:18606 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key

15

Odp: Błąd w kompilacji

No i połączył się.  Dalej to już masz tak jak sobei serwer openvpn skonfigurowałeś, raczej to już nic wspólnego z samodzielną budową obrazu nie ma. Zakładając że robisz odpowiednie sekcje w firewallu i networku.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

16

Odp: Błąd w kompilacji

Podłączył się jak zrobiłem
/etc/init.d/openvpn stop
/etc/init.d/openvpn start

to wszytsko skopiowałem ustawień jakie miałem na starym obrazie.

17

Odp: Błąd w kompilacji

To teraz załóż nowy wątek i opisuj problem z połączeniem przez openvpn; ten wątek dotyczył kompilacji...

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

18

Odp: Błąd w kompilacji

ok