hanwckf / rt-n56u

Padavan
3.28k stars 3.69k forks source link

softethervpn与TRANSMISSION编译报错是个例吗? #178

Closed SouHong closed 4 years ago

SouHong commented 4 years ago

使用最新源码编译 /opt/rt-n56u/toolchain-mipsel/toolchain-3.4.x/bin/mipsel-linux-uclibc-gcc -mips32r2 -march=mips32r2 -Os -fomit-frame-pointer -pipe -Dlinux -Dlinux -Dunix -DEMBED -I/opt/rt-n56u/trunk/stage/include -Wall -Wno-trigraphs -Wno-strict-aliasing -Wno-format-security -Wno-unused-but-set-variable -fno-tree-slsr -Wno-pointer-sign -minterlink-mips16 -DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_LINUX -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -O2 -fsigned-char -fPIC -c src/Mayaqua/Network.c -o tmp/objs/Mayaqua/Network.o In file included from src/Mayaqua/Memory.c:105:0: ./src/GlobalConst.h:102:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning(disable : 4819)

In file included from src/Mayaqua/Network.c:107:0: ./src/GlobalConst.h:102:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning(disable : 4819)

src/Mayaqua/Encrypt.c:121:10: fatal error: openssl/engine.h: No such file or directory

include <openssl/engine.h>

      ^~~~~~~~~~~~~~~~~~

compilation terminated. src/Mayaqua/Mayaqua.c:145:15: warning: 'probe_last' defined but not used [-Wunused-variable] static UINT64 probe_last = 0; ^~~~~~ src/Mayaqua/Mayaqua.c:141:13: warning: 'use_probe' defined but not used [-Wunused-variable] static bool use_probe = false; ^~~~~ src/Mayaqua/Mayaqua.c:137:13: warning: 'first_time_check' defined but not used [-Wunused-variable] static UINT first_time_check = 0; ^~~~ src/Mayaqua/Mayaqua.c:136:13: warning: 'last_time_check' defined but not used [-Wunused-variable] static UINT last_time_check = 0; ^~~~~~~ src/makefiles/linux_32bit.mak:110: recipe for target 'tmp/objs/Mayaqua/Encrypt.o' failed make[3]: [tmp/objs/Mayaqua/Encrypt.o] Error 1 make[3]: 正在等待未完成的任务.... src/Mayaqua/Kernel.c: In function 'c_mkgmtime': src/Mayaqua/Kernel.c:2214:2: warning: this 'else' clause does not guard... [-Wmisleading-indentation] else ^~~~ src/Mayaqua/Kernel.c:2224:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else' tm->tm_year = years - 1900; ^~ In file included from ./src/Mayaqua/Mayaqua.h:324:0, from src/Mayaqua/Memory.c:115: src/Mayaqua/Memory.c: In function 'GetMemSize': ./src/Mayaqua/MayaType.h:225:69: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

define POINTER_TO_UINT64(p) (((sizeof(void *) == sizeof(UINT64)) ? (UINT64)(p) : (UINT64)((UINT)(p))))

                                                                 ^

./src/Mayaqua/Memory.h:121:52: note: in expansion of macro 'POINTER_TO_UINT64'

define IS_NULL_POINTER(p) (((p) == NULL) || ((POINTER_TO_UINT64(p) == (UINT64)sizeof(MEMTAG))))

                                                ^~~~~~~~~~~~~~~~~

src/Mayaqua/Memory.c:4020:6: note: in expansion of macro 'IS_NULL_POINTER' if (IS_NULL_POINTER(addr)) ^~~~~~~ src/Mayaqua/Memory.c: In function 'ReAlloc': ./src/Mayaqua/MayaType.h:225:69: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

define POINTER_TO_UINT64(p) (((sizeof(void *) == sizeof(UINT64)) ? (UINT64)(p) : (UINT64)((UINT)(p))))

                                                                 ^

./src/Mayaqua/Memory.h:121:52: note: in expansion of macro 'POINTER_TO_UINT64'

define IS_NULL_POINTER(p) (((p) == NULL) || ((POINTER_TO_UINT64(p) == (UINT64)sizeof(MEMTAG))))

                                                ^~~~~~~~~~~~~~~~~

src/Mayaqua/Memory.c:4037:6: note: in expansion of macro 'IS_NULL_POINTER' if (IS_NULL_POINTER(addr)) ^~~~~~~ src/Mayaqua/Memory.c: In function 'Free': ./src/Mayaqua/MayaType.h:225:69: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

define POINTER_TO_UINT64(p) (((sizeof(void *) == sizeof(UINT64)) ? (UINT64)(p) : (UINT64)((UINT)(p))))

                                                                 ^

./src/Mayaqua/Memory.h:121:52: note: in expansion of macro 'POINTER_TO_UINT64'

define IS_NULL_POINTER(p) (((p) == NULL) || ((POINTER_TO_UINT64(p) == (UINT64)sizeof(MEMTAG))))

                                                ^~~~~~~~~~~~~~~~~

src/Mayaqua/Memory.c:4094:6: note: in expansion of macro 'IS_NULL_POINTER' if (IS_NULL_POINTER(addr)) ^~~~~~~ src/Mayaqua/Network.c:137:10: fatal error: openssl/engine.h: No such file or directory

include <openssl/engine.h>

      ^~~~~~~~~~~~~~~~~~

compilation terminated. src/makefiles/linux_32bit.mak:131: recipe for target 'tmp/objs/Mayaqua/Network.o' failed make[3]: ** [tmp/objs/Mayaqua/Network.o] Error 1 src/Mayaqua/Internat.c: In function 'Utf8ToUni': src/Mayaqua/Internat.c:2069:21: warning: 'c2' may be used uninitialized in this function [-Wmaybe-uninitialized] ((BYTE )&c)[3] = c2;


src/Mayaqua/Internat.c:2068:21: warning: 'c1' may be used uninitialized in this function [-Wmaybe-uninitialized]
     ((BYTE *)&c)[2] = c1;
     ~~~~~~~~~~~~~~~~^~~~
src/Mayaqua/FileIO.c: In function 'MakeDirExW':
src/Mayaqua/FileIO.c:2420:7: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
  bool ret;
       ^~~
make[3]: Leaving directory '/opt/rt-n56u/trunk/user/softethervpn/v4.29-9680'
Makefile:13: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/opt/rt-n56u/trunk/user/softethervpn'
Makefile:209: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/opt/rt-n56u/trunk/user'
Makefile:202: recipe for target 'user_only' failed
make: *** [user_only] Error 2

另外 TRANSMISSION 也编译报错。
net.c:514:30: warning: cast increases required alignment of target type [-Wcast-align]
           (unsigned char*)& ((struct sockaddr_in6*)sa)->sin6_addr;
                              ^
  CC       peer-io.o
  CC       peer-mgr.o
  CC       peer-msgs.o
peer-msgs.c: In function 'peermsgs_is_transferring_pieces':
peer-msgs.c:2489:34: warning: cast increases required alignment of target type [-Wcast-align]
       const tr_peerMsgs * msgs = (const tr_peerMsgs *) peer;
                                  ^
  CC       platform.o
  CC       platform-quota.o
In file included from platform-quota.c:29:0:
platform-quota.c: In function 'getquota':
platform-quota.c:289:38: error: 'struct dqblk' has no member named 'dqb_curblocks'; did you mean 'dqb_curinodes'?
       spaceused = (int64_t) btodb(dq.dqb_curblocks);
                                      ^
Makefile:1249: recipe for target 'platform-quota.o' failed
make[4]: *** [platform-quota.o] Error 1
make[4]: Leaving directory '/opt/rt-n56u/trunk/user/transmission/transmission-2.9x/libtransmission'
Makefile:502: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/opt/rt-n56u/trunk/user/transmission/transmission-2.9x'
Makefile:9: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/opt/rt-n56u/trunk/user/transmission'

不编译 TRANSMISSION 与 softethervpn 可以正常编译。

yk_l1_full.config 内容:
### Target Vendor/Product (support only Ralink RT3883/MT7620/MT7621/MT7628)
CONFIG_VENDOR=Ralink
CONFIG_PRODUCT=MT7620

### Target ProductID (board select, max 12 symbols)
CONFIG_FIRMWARE_PRODUCT_ID="YK-L1"

### Linux kernel and toolchain
CONFIG_LINUXDIR=linux-3.4.x
CONFIG_TOOLCHAIN_DIR=/opt/rt-n56u/toolchain-mipsel

############################################################
### Linux kernel configuration
############################################################

### Build ROOTFS_IN_RAM firmware mode (kernel+initramfs).
### Decreased firmware size, but more RAM used, slow boot.
### Also allow build image for load w/o flash from UART console
#CONFIG_FIRMWARE_TYPE_ROOTFS_IN_RAM=y

### Force MT7620 CPU clock to 600MHz (override Uboot settings)
#CONFIG_FIRMWARE_CPU_600MHZ=y

### Enable MT7620 CPU sleep mode (downclock to 200MHz on idle)
#CONFIG_FIRMWARE_CPU_SLEEP=y

### Kernel driver select for WiFi AP 2.4GHz
### 2.7 = MT7620 v2.7.2.0
### 3.0 = MT7620 v3.0.4.0
CONFIG_FIRMWARE_WIFI2_DRIVER=2.7

### Kernel driver select for WiFi AP 5GHz
### 3.0 = MT7612E v3.0.4.0
CONFIG_FIRMWARE_WIFI5_DRIVER=3.0

### Enable IPv6 support
CONFIG_FIRMWARE_ENABLE_IPV6=y

### Enable USB support
CONFIG_FIRMWARE_ENABLE_USB=y

### Enable NTFS filesystem support via Paragon "ufsd" driver. ~0.4MB
CONFIG_FIRMWARE_ENABLE_UFSD=y

### Enable FAT/FAT32 filesystem support. ~0.1MB
CONFIG_FIRMWARE_ENABLE_FAT=y

### Enable exFAT (FAT/FAT32 too) filesystem support. ~0.12MB
CONFIG_FIRMWARE_ENABLE_EXFAT=y

### Enable EXT2 filesystem support. ~0.1MB
CONFIG_FIRMWARE_ENABLE_EXT2=y

### Enable EXT3 filesystem support. ~0.2MB
CONFIG_FIRMWARE_ENABLE_EXT3=y

### Enable EXT4 (EXT3/2 too) filesystem support. ~0.4MB
CONFIG_FIRMWARE_ENABLE_EXT4=y

### Enable XFS filesystem support. ~0.6MB
CONFIG_FIRMWARE_ENABLE_XFS=y

### Enable FUSE (filesystems in userspace) support. ~0.1MB
CONFIG_FIRMWARE_ENABLE_FUSE=y

### Enable swap files/partitions support. ~0.05MB
CONFIG_FIRMWARE_ENABLE_SWAP=n

### Include UVC camera modules. ~0.2MB
CONFIG_FIRMWARE_INCLUDE_UVC=y

### Include USB-HID modules. ~0.2MB
CONFIG_FIRMWARE_INCLUDE_HID=n

### Include USB-Serial modules (e.g. pl2303). ~0.03MB
CONFIG_FIRMWARE_INCLUDE_SERIAL=y

### Include USB-Audio modules ~0.46MB
CONFIG_FIRMWARE_INCLUDE_AUDIO=n

### Include network QoS scheduling modules. ~0.2MB
CONFIG_FIRMWARE_INCLUDE_QOS=y

### Include IMQ module for shapers (a bit of performance degradation). ~0.02MB
CONFIG_FIRMWARE_INCLUDE_IMQ=n

### Include IFB module for shapers. ~0.03MB
CONFIG_FIRMWARE_INCLUDE_IFB=n

### Include IPSet utility and kernel modules. ~0.4MB
CONFIG_FIRMWARE_INCLUDE_IPSET=y

### Include NFSv3 server. ~0.6MB
CONFIG_FIRMWARE_INCLUDE_NFSD=n

### Include NFSv3 client. ~0.5MB
CONFIG_FIRMWARE_INCLUDE_NFSC=n

### Include CIFS (SMB) client. ~0.2MB
CONFIG_FIRMWARE_INCLUDE_CIFS=n

############################################################
### Userspace configuration
############################################################

### Include WebUI international resources. Increased firmware size
CONFIG_FIRMWARE_INCLUDE_LANG_CN=y
#CONFIG_FIRMWARE_INCLUDE_LANG_BR=y
#CONFIG_FIRMWARE_INCLUDE_LANG_CZ=y
#CONFIG_FIRMWARE_INCLUDE_LANG_DA=y
#CONFIG_FIRMWARE_INCLUDE_LANG_DE=y
#CONFIG_FIRMWARE_INCLUDE_LANG_ES=y
#CONFIG_FIRMWARE_INCLUDE_LANG_FI=y
#CONFIG_FIRMWARE_INCLUDE_LANG_FR=y
#CONFIG_FIRMWARE_INCLUDE_LANG_NO=y
#CONFIG_FIRMWARE_INCLUDE_LANG_PL=y
#CONFIG_FIRMWARE_INCLUDE_LANG_RU=y
#CONFIG_FIRMWARE_INCLUDE_LANG_SV=y
#CONFIG_FIRMWARE_INCLUDE_LANG_UK=y

### Include NTFS-3G FUSE driver (instead of Paragon "ufsd"). ~0.4MB
CONFIG_FIRMWARE_INCLUDE_NTFS_3G=n

### Include LPR printer daemon. ~0.12MB
CONFIG_FIRMWARE_INCLUDE_LPRD=y

### Include USB-over-Ethernet printer daemon. ~0.05MB
CONFIG_FIRMWARE_INCLUDE_U2EC=y

### Include "tcpdump" utility. ~0.6MB
CONFIG_FIRMWARE_INCLUDE_TCPDUMP=y

### Include "hdparm" utility (allow set HDD spindown timeout and APM). ~0.1MB
CONFIG_FIRMWARE_INCLUDE_HDPARM=y

### Include "parted" utility (allow make GPT partitions). ~0.3MB
CONFIG_FIRMWARE_INCLUDE_PARTED=y

### Include SMB (and WINS) server. ~1.5MB
CONFIG_FIRMWARE_INCLUDE_SMBD=y

### using samba3.6 instead of samba3
CONFIG_FIRMWARE_INCLUDE_SMBD36=y

### Include WINS server only. ~0.4MB
CONFIG_FIRMWARE_INCLUDE_WINS=n

### Include syslog for SMB and WINS server. ~0.3MB
CONFIG_FIRMWARE_INCLUDE_SMBD_SYSLOG=n

### Include FTP server. ~0.2MB
CONFIG_FIRMWARE_INCLUDE_FTPD=y

### Include alternative L2TP control client RP-L2TP. ~0.1MB
CONFIG_FIRMWARE_INCLUDE_RPL2TP=y

### Include EAP-TTLS and EAP-PEAP authentication support. openssl ~1.2MB, wpa_supplicant +0.04MB
CONFIG_FIRMWARE_INCLUDE_EAP_PEAP=y

### Include HTTPS support for DDNS client. openssl ~1.2MB
CONFIG_FIRMWARE_INCLUDE_DDNS_SSL=n

### Include HTTPS support. openssl ~1.2MB
CONFIG_FIRMWARE_INCLUDE_HTTPS=y

### Include sftp-server. openssl ~1.2MB, sftp-server ~0.06MB
CONFIG_FIRMWARE_INCLUDE_SFTP=y

### Include dropbear SSH. ~0.3MB
CONFIG_FIRMWARE_INCLUDE_DROPBEAR=n

### Make the dropbear symmetrical ciphers and hashes faster. ~0.06MB
CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE=n

### Include OpenSSH instead of dropbear. openssl ~1.2MB, openssh ~1.0MB
CONFIG_FIRMWARE_INCLUDE_OPENSSH=y

### Include OpenVPN. IPv6 required. openssl ~1.2MB, openvpn ~0.4MB
CONFIG_FIRMWARE_INCLUDE_OPENVPN=y

### Include Elliptic Curves (EC) to openssl library. ~0.1MB
CONFIG_FIRMWARE_INCLUDE_OPENSSL_EC=y

### Include "openssl" executable for generate certificates. ~0.4MB
CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y

### Include xUPNPd IPTV mediaserver. ~0.3MB
CONFIG_FIRMWARE_INCLUDE_XUPNPD=y

### Include Minidlna UPnP mediaserver. ~1.6MB
CONFIG_FIRMWARE_INCLUDE_MINIDLNA=y

### Include Firefly iTunes mediaserver. ~1.0MB
CONFIG_FIRMWARE_INCLUDE_FIREFLY=n

### Include ffmpeg 0.11.x instead of 0.6.x for Minidlna and Firefly. ~0.1MB
CONFIG_FIRMWARE_INCLUDE_FFMPEG_NEW=y

### Include Transmission torrent. openssl ~1.2MB, transmission ~1.5MB
CONFIG_FIRMWARE_INCLUDE_TRANSMISSION=n

### Include Transmission-Web-Control (advanced WebUI). ~0.8MB
CONFIG_FIRMWARE_INCLUDE_TRANSMISSION_WEB_CONTROL=n

### Include Aria2 download manager. openssl ~1.2MB, aria2 ~3.5MB
CONFIG_FIRMWARE_INCLUDE_ARIA=y

### Include Aria2 WEB control. ~0.7MB
CONFIG_FIRMWARE_INCLUDE_ARIA_WEB_CONTROL=y

CONFIG_FIRMWARE_INCLUDE_CURL=y

CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=y

CONFIG_FIRMWARE_INCLUDE_GDUT_DRCOM=n

CONFIG_FIRMWARE_INCLUDE_DOGCOM=n

CONFIG_FIRMWARE_INCLUDE_MINIEAP=n

CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=y

CONFIG_FIRMWARE_INCLUDE_NAPT66=y

CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=y

CONFIG_FIRMWARE_INCLUDE_SSSERVER=n

CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER=y

CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT=y

CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD=y

CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=y

CONFIG_FIRMWARE_INCLUDE_VLMCSD=y

CONFIG_FIRMWARE_INCLUDE_TTYD=y

CONFIG_FIRMWARE_INCLUDE_LRZSZ=y

CONFIG_FIRMWARE_INCLUDE_HTOP=y

CONFIG_FIRMWARE_INCLUDE_NANO=y

CONFIG_FIRMWARE_INCLUDE_IPERF3=y

CONFIG_FIRMWARE_INCLUDE_DUMP1090=y

CONFIG_FIRMWARE_INCLUDE_RTL_SDR=y

CONFIG_FIRMWARE_INCLUDE_MTR=y

CONFIG_FIRMWARE_INCLUDE_SOCAT=y

CONFIG_FIRMWARE_INCLUDE_SRELAY=y

CONFIG_FIRMWARE_INCLUDE_MENTOHUST=y

CONFIG_FIRMWARE_INCLUDE_FRPC=y

CONFIG_FIRMWARE_INCLUDE_FRPS=y

CONFIG_FIRMWARE_INCLUDE_TUNSAFE=n
hanwckf commented 4 years ago

sevpn已经修复;transmission不在支持范围内