Closed zw963 closed 8 years ago
Hi, I found the LDFLAGS
is not make effect.
The final -L export into Make files is: -L/home/zw963/Dropbox/common/personal/ac66U/zlib -L/home/zw963/Dropbox/common/personal/ac66U/openssl/lib
Not -L$ac66U/lib
.
I have try any method i know to let Makefile know I add a -Lpath
in
configure LDFLAGS=-L$ac66U/lib ...
But all not worked.
Current ystem: Linux Mint 17.3 x64.
Thanks.
You need a new toolchain. GCC 4.2 is not supported.
Is there any alternative way to workaround this?
toolchain is select by merlin, not me.
It is seem like broken link is following commnd.
libtool: link: mipsel-linux-uclibc-gcc -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasing -std=gnu99 -D_GNU_SOURCE -pthread -I../libev -I../libudns -I../libsodium/src/libsodium/include -I../libipset/include -I../libcork/include -DMODULE_LOCAL -g -O2 -I/home/zw963/Dropbox/common/personal/ac66U/openssl/include -pthread -o ss-local ss_local-utils.o ss_local-jconf.o ss_local-json.o ss_local-encrypt.o ss_local-udprelay.o ss_local-cache.o ss_local-acl.o ss_local-netutils.o ss_local-local.o -L/home/zw963/Dropbox/common/personal/ac66U/zlib -L/home/zw963/Dropbox/common/personal/ac66U/openssl/lib ../libipset/.libs/libipset.a ../libcork/.libs/libcork.a ../libev/.libs/libev.a ../libsodium/src/libsodium/.libs/libsodium.a ../libudns/.libs/libudns.a -lcrypto -lm -lz -ldl -pthread
Use Tomatoware mipsel and static compile, slower but work.
@rampageX , What the means of static compile
?
add --enable-static
to configure ?
@zw963 did you find some solution ? some workaround with gcc 4.2 ?¡ thanks.
@jun0s , use Tomatoware toolchains.
@zw963 @jun0s Tomatoware, Please refer to: https://github.com/lancethepants/tomatoware.
Simply install the support package on router and do native build on router, do not need do cross-compile.
In addition to Entware, I have all the necessary software that are compiled with Tomatoware on router, with static compile, compiled once then run everywhere, as long as the same type of CPU.
Attachment which I compile on my ASUS AC66U router, OpenSSL, Mbedtsl, PolarSSL three versions included.
Shadowsocks-libev.mipsel.v2.5.5.static.7z
Link: http://pan.baidu.com/s/1mhFy8Gw Password: 78nx
The cork library needs __sync_add_and_fetch
, __sync_fetch_and_add
, __sync_sub_and_fetch
, __sync_fetch_and_sub
and __sync_val_compare_and_swap
to work.
You can implement these functions using uclibc's, just like this (which is not full compatible, and has no variable argument lists support, but just works):
#ifdef __UCLIBC__
#ifndef UCLIBC_ATOMIC_H
#define UCLIBC_ATOMIC_H
#include <atomic.h>
#ifndef __sync_add_and_fetch
#define __sync_add_and_fetch(mem, value) \
(atomic_exchange_and_add ((mem), value) + value)
#endif
#ifndef __sync_fetch_and_add
#define __sync_fetch_and_add atomic_exchange_and_add
#endif
#ifndef __sync_sub_and_fetch
#define __sync_sub_and_fetch(mem, value) \
(atomic_exchange_and_add ((mem), 0 - value) - value)
#endif
#ifndef __sync_fetch_and_sub
#define __sync_fetch_and_sub(mem, value) \
atomic_exchange_and_add ((mem), 0 - value)
#endif
#ifndef __sync_val_compare_and_swap
#define __sync_val_compare_and_swap(mem, oldval, newval) \
atomic_compare_and_exchange_val_acq (mem, newval, oldval)
#endif
#endif /* UCBLIC_ATOMIC_H */
#endif /* __UCLIBC__ */
Try to include it in libcork/threads/atomics.h
and continue compilation.
thank you @zw963 but i need a toolchain for arm big endian, and thank you very much @rampageX but.. the same :( @xc2 did yout think that in my case can work ur solution?
Thank you so much guys... :)
Following is error message:
The problem seem like is, make told me
libc.so.1
could not foundFollowing is my compile args, all need library is copy to $ac66U/lib, But, still told me missing lib files.
Thanks.