You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/11/25 09:24:00 UTC
[GitHub] [trafficserver] ancjf opened a new issue #7353: static link
ancjf opened a new issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353
I run:
autoreconf -i --force
./configure CFLAGS="-DBIG_SECURITY_HOLE" CXXFLAGS="-DBIG_SECURITY_HOLE" LDFLAGS="-lpthread -ldl -lz -static" --prefix=/opt/trafficserver-8.1.0
make V=1
There will be an error:
libtool: link: c++ -std=c++17 -g -pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -Wno-noexcept-type -mcx16 -DBIG_SECURITY_HOLE -rdynamic -Wl,--as-needed -o traffic_manager/traffic_manager traffic_manager/traffic_manager_traffic_manager-AddConfigFilesHere.o traffic_manager/traffic_manager_traffic_manager-traffic_manager.o -L/mnt/hgfs/src/trafficserver/lib/yamlcpp ../mgmt/api/.libs/libmgmtapilocal.a /mnt/hgfs/src/trafficserver/src/tscore/.libs/libtscore.a ../mgmt/.libs/libmgmt_lm.a ../proxy/hdrs/libhdrs.a ../src/tscore/.libs/libtscore.a /mnt/hgfs/src/trafficserver/src/tscpp/util/.libs/libtscpputil.a -lresolv ../src/tscpp/util/.libs/libtscpputil.a ../iocore/eventsystem/libinkevent.a ../lib/records/librecords_lm.a ../proxy/shared/libdiagsconfig.a -lpcre -lhwloc /mnt/hgfs/src/trafficserver/lib/yamlcpp/.libs/libyamlcpp.a
-lssl -lcrypto -lpthread -ldl -lz
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `new_IOBufferData_internal(char const*, long, AllocType)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:221: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:269: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `IOBufferData::alloc(long, AllocType)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:233: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:269: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `new_IOBufferData_internal(char const*, long, AllocType)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:221: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `IOBufferBlock::alloc(long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:269: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:152: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Inline.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(Lock.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(UnixEThread.o): In function `EThread::EThread(ThreadType, int)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/UnixEThread.cc:88: undefined reference to `InkRand::InkRand(unsigned long)'
../iocore/eventsystem/libinkevent.a(UnixEThread.o): In function `EThread::EThread(ThreadType, Event*)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/UnixEThread.cc:116: undefined reference to `InkRand::InkRand(unsigned long)'
../iocore/eventsystem/libinkevent.a(UnixEThread.o): In function `EThread::EThread()':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/UnixEThread.cc:83: undefined reference to `InkRand::InkRand(unsigned long)'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `new_IOBufferData_internal(char const*, long, AllocType)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:221: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `MIOBuffer::write(void const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:269: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `new_IOBufferData_internal(char const*, long, AllocType)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:221: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `MIOBuffer::write(void const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:277: undefined reference to `res_track_memory'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `iobuffer_mem_inc(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:163: undefined reference to `ResourceTracker::increment(char const*, long)'
../iocore/eventsystem/libinkevent.a(IOBuffer.o): In function `iobuffer_mem_dec(char const*, long)':
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:169: undefined reference to `res_track_memory'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
/mnt/hgfs/src/trafficserver/iocore/eventsystem/P_IOBuffer.h:179: undefined reference to `ResourceTracker::increment(char const*, long)'
../lib/records/librecords_lm.a(RecCore.o): In function `RecCoreInit(RecModeT, Diags*)':
/mnt/hgfs/src/trafficserver/lib/records/RecCore.cc:209: undefined reference to `ink_rwlock_init(pthread_rwlock_t*)'
../lib/records/librecords_lm.a(RecHttp.o): In function `RecHttpLoadIpMap(char const*, IpMap&)':
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IpMap.h:440: undefined reference to `IpMap::fill(sockaddr const*, sockaddr const*, void*)'
../lib/records/librecords_lm.a(RecHttp.o): In function `RecHttpLoadIpMap(char const*, IpMap&)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:161: undefined reference to `IpMap::count() const'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::HttpProxyPort()':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:217: undefined reference to `host_res_default_preference_order'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:217: undefined reference to `host_res_default_preference_order'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::print(char*, unsigned long)':
/usr/include/c++/7/bits/stl_algobase.h:800: undefined reference to `host_res_default_preference_order'
/usr/include/c++/7/bits/stl_algobase.h:800: undefined reference to `host_res_default_preference_order'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::print(char*, unsigned long)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:646: undefined reference to `ts_host_res_order_to_string(std::array<HostResPreference, 3ul> const&, char*, int)'
../lib/records/librecords_lm.a(RecHttp.o): In function `ts_host_res_global_init()':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:699: undefined reference to `HOST_RES_DEFAULT_PREFERENCE_ORDER'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:699: undefined reference to `host_res_default_preference_order'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:699: undefined reference to `HOST_RES_DEFAULT_PREFERENCE_ORDER'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:699: undefined reference to `host_res_default_preference_order'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:702: undefined reference to `host_res_default_preference_order'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:702: undefined reference to `parse_host_res_preference(char const*, std::array<HostResPreference, 3ul>&)'
../lib/records/librecords_lm.a(RecHttp.o): In function `SessionProtocolNameRegistry::toIndex(ts::TextView)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:770: undefined reference to `ts::MemArena::alloc(unsigned long)'
../lib/records/librecords_lm.a(RecHttp.o): In function `SessionProtocolNameRegistry::markIn(char const*, SessionProtocolSet&)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:770: undefined reference to `ts::MemArena::alloc(unsigned long)'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::processOptions(char const*)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:473: undefined reference to `HOST_RES_PREFERENCE_STRING'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:473: undefined reference to `HOST_RES_PREFERENCE_STRING'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:504: undefined reference to `parse_host_res_preference(char const*, std::array<HostResPreference, 3ul>&)'
../lib/records/librecords_lm.a(RecHttp.o): In function `mptcp_supported':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:95: undefined reference to `TextBuffer::TextBuffer(int)'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:97: undefined reference to `TextBuffer::slurp(int)'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:95: undefined reference to `TextBuffer::~TextBuffer()'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:95: undefined reference to `TextBuffer::~TextBuffer()'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::loadValue(std::vector<HttpProxyPort, std::allocator<HttpProxyPort> >&, char const*)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:217: undefined reference to `host_res_default_preference_order'
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:217: undefined reference to `host_res_default_preference_order'
../lib/records/librecords_lm.a(RecHttp.o): In function `HttpProxyPort::processFamilyPreference(char const*)':
/mnt/hgfs/src/trafficserver/lib/records/RecHttp.cc:504: undefined reference to `parse_host_res_preference(char const*, std::array<HostResPreference, 3ul>&)'
../lib/records/librecords_lm.a(RecHttp.o): In function `ts::IntrusivePtr<ts::MemArena::Block>::unset()':
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: undefined reference to `ts::MemArena::Block::operator delete(void*)'
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: undefined reference to `ts::MemArena::Block::operator delete(void*)'
../lib/records/librecords_lm.a(RecHttp.o): In function `SessionProtocolNameRegistry::~SessionProtocolNameRegistry()':
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: undefined reference to `ts::MemArena::Block::operator delete(void*)'
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: undefined reference to `ts::MemArena::Block::operator delete(void*)'
/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: undefined reference to `ts::MemArena::Block::operator delete(void*)'
../lib/records/librecords_lm.a(RecHttp.o):/mnt/hgfs/src/trafficserver/lib/records/../../include/tscore/IntrusivePtr.h:382: more undefined references to `ts::MemArena::Block::operator delete(void*)' follow
place:
src/Makefile
::traffic_server_traffic_server_LDADD
::traffic_manager_traffic_manager_LDADD
The link order is wrong, libtscore.la should be placed later
In this way, you can compile it on raspberry, and then copy trafficserver to other arm machines to run. Please correct this problem so that trafficserver can better support static compilation
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
bneradt commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-996992540
@ancjf : When I add `-static` to my configure line as you suggest, it fails configuration. I don't get as far as you, since you seem to make to to compilation with these flags.
Here's how this can be reproduced using our CI's centos 8 docker image:
```
docker pull controller.trafficserver.org/ats/centos:8
docker run -it controller.trafficserver.org/ats/centos:8 /bin/bash
# Now, from within the running container:
git clone https://github.com/apache/trafficserver.git
cd trafficserver/
autoreconf -fi
# Repeating your configure line:
./configure CFLAGS="-DBIG_SECURITY_HOLE" CXXFLAGS="-DBIG_SECURITY_HOLE" LDFLAGS="-lpthread -ldl -lz -static" --prefix=/opt/trafficserver-8.1.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for chosen layout... TrafficServer
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable debugging... no
checking whether to enable mime sanity check... no
checking whether to enable all asserts, a cheaper debug... no
checking whether to code coverage... no
checking whether to enable -Werror... no
checking whether to enable asan... no
checking whether to enable lsan... no
checking whether to enable tsan... no
checking whether to enable fast SDK APIs... no
checking whether to enable CURL... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for curl-config... /opt/bin/curl-config
checking for curl (7.79.0-DEV) >= 7.19... yes
checking whether to enable diags... yes
checking whether to enable fips... no
checking whether to enable regression tests... yes
checking whether to enable expensive unit tests... no
checking for java... java
Checking whether to build documentation:
Will build documentation: no
checking whether to enable WCCP v2 support... no
checking whether to enable profiler... no
checking whether to enable eventfd()... yes
checking whether to use POSIX capabilities... auto
checking whether to use hwloc library... yes
checking whether to enable ccache... no
checking whether to enable hardening of the executables... no
checking whether to enable TPROXY based transparency... auto
checking whether to enable experimental plugins... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBMAGICKCPP... no
checking for LIBMAGICKCPP... yes
checking whether to install example plugins... no
checking whether to install testing tools... no
checking whether to allow 32-bit builds... no
checking for cc... cc
checking whether the C compiler works... no
configure: error: in `/root/trafficserver':
configure: error: C compiler cannot create executables
See `config.log' for more details
```
The config.log has this:
```
compilation terminated.
configure:7024: $? = 1
configure:7044: checking whether the C compiler works
configure:7066: cc -DBIG_SECURITY_HOLE -lpthread -ldl -lz -static conftest.c >&5
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -ldl
/usr/bin/ld: cannot find -lz
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
configure:7070: $? = 1
configure:7108: result: no
```
Simplifying to ` ./configure LDFLAGS="-static" --prefix=/opt/trafficserver-8.1.0` produces a similar error. I also get the same results if I checkout and repeat these commands from 8.1.x.
Perhaps I'm missing some steps you performed to get as far as you did? Can you reproduce your build in the centos:8 docker image as I describe above? Or, alternatively, can you point me to a docker image I can reproduce your results in? Without more information, I'm blocked from reproducing your situation and, subsequently, working on a fix.
Thanks,
Brian
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
bneradt commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-993045311
I'll try this out locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] masaori335 commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
masaori335 commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-737583547
> The link order is wrong, libtscore.la should be placed later
>
> In this way, you can compile it on raspberry, and then copy trafficserver to other arm machines to run.
@ancjf Seem like you have a patch. Could you open a PR?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] rajeshadp commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
rajeshadp commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-1046932746
Hi
I am trying to build static build for trafficserver from code https://github.com/apache/trafficserver on Ubuntu 20.04
using commands:
autoreconf -i --force
./configure CFLAGS="-DBIG_SECURITY_HOLE" CXXFLAGS="-DBIG_SECURITY_HOLE" LDFLAGS="-lpthread -ldl -lz -static" --prefix=/opt/ats/
configuration is successful, but make fails with below errors: (make succeeds if I remove -static above), any ideas?
make[2]: Entering directory '/home/embedur/trafficserver/src/tscore'
Makefile:2641: warning: overriding recipe for target 'CompileParseRules'
Makefile:1199: warning: ignoring old recipe for target 'CompileParseRules'
CXX unit_tests/freelist_benchmark-freelist_benchmark.o
CXX Arena.lo
CXX ArgParser.lo
CXX BaseLogFile.lo
CXX BufferWriterFormat.lo
CXX ContFlags.lo
CXX CryptoHash.lo
In file included from ../../include/tscore/ink_config.h:40,
from ../../include/tscore/ink_platform.h:27,
from CryptoHash.cc:28:
/usr/include/openssl/bio.h:553:6: error: expected ‘)’ before ‘*’ token
553 | void BIO_set_data(BIO *a, void *ptr);
| ^~~~~~~~~~~~
../../include/ink_autoconf.h:27:32: note: to match this ‘(’
27 | #define BIO_set_data(a, _ptr) ((a)->ptr = (_ptr))
| ^
/usr/include/openssl/bio.h:553:6: error: expected ‘)’ before ‘*’ token
553 | void BIO_set_data(BIO *a, void *ptr);
| ^~~~~~~~~~~~
../../include/ink_autoconf.h:27:31: note: to match this ‘(’
27 | #define BIO_set_data(a, _ptr) ((a)->ptr = (_ptr))
| ^
/usr/include/openssl/bio.h:554:7: error: expected ‘)’ before ‘*’ token
554 | void *BIO_get_data(BIO *a);
| ^~~~~~~~~~~~
../../include/ink_autoconf.h:12:26: note: to match this ‘(’
12 | #define BIO_get_data(a) ((a)->ptr)
| ^
/usr/include/openssl/bio.h:554:7: error: expected ‘)’ before ‘*’ token
554 | void *BIO_get_data(BIO *a);
| ^~~~~~~~~~~~
../../include/ink_autoconf.h:12:25: note: to match this ‘(’
12 | #define BIO_get_data(a) ((a)->ptr)
| ^
/usr/include/openssl/bio.h:558:5: error: expected ‘)’ before ‘*’ token
558 | int BIO_get_shutdown(BIO *a);
| ^~~~~~~~~~~~~~~~
../../include/ink_autoconf.h:15:30: note: to match this ‘(’
15 | #define BIO_get_shutdown(a) ((a)->shutdown)
| ^
/usr/include/openssl/bio.h:558:5: error: expected ‘)’ before ‘*’ token
558 | int BIO_get_shutdown(BIO *a);
| ^~~~~~~~~~~~~~~~
../../include/ink_autoconf.h:15:29: note: to match this ‘(’
15 | #define BIO_get_shutdown(a) ((a)->shutdown)
| ^
/usr/include/openssl/bio.h:787:8: error: expected unqualified-id before ‘const’
787 | long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
| ^~~~~~~~~~~~~~~~~
/usr/include/openssl/bio.h:787:8: error: expected ‘)’ before ‘const’
../../include/ink_autoconf.h:21:34: note: to match this ‘(’
21 | #define BIO_meth_get_ctrl(biom) ((biom)->ctrl)
| ^
/usr/include/openssl/bio.h:787:8: error: expected ‘)’ before ‘const’
787 | long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
| ^~~~~~~~~~~~~~~~~
../../include/ink_autoconf.h:21:33: note: to match this ‘(’
21 | #define BIO_meth_get_ctrl(biom) ((biom)->ctrl)
| ^
/usr/include/openssl/bio.h:787:8: error: expected ‘)’ before ‘const’
787 | long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:16,
from ../../include/tscore/SHA256.h:28,
from CryptoHash.cc:30:
/usr/include/openssl/bio.h:787:6: note: to match this ‘(’
787 | long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int, long, void *);
| ^
In file included from ../../include/tscore/ink_config.h:40,
from ../../include/tscore/ink_platform.h:27,
from CryptoHash.cc:28:
/usr/include/openssl/bio.h:790:7: error: expected unqualified-id before ‘const’
790 | int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~
/usr/include/openssl/bio.h:790:7: error: expected ‘)’ before ‘const’
../../include/ink_autoconf.h:18:36: note: to match this ‘(’
18 | #define BIO_meth_get_create(biom) ((biom)->create)
| ^
/usr/include/openssl/bio.h:790:7: error: expected ‘)’ before ‘const’
790 | int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~
../../include/ink_autoconf.h:18:35: note: to match this ‘(’
18 | #define BIO_meth_get_create(biom) ((biom)->create)
| ^
/usr/include/openssl/bio.h:790:7: error: expected ‘)’ before ‘const’
790 | int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:16,
from ../../include/tscore/SHA256.h:28,
from CryptoHash.cc:30:
/usr/include/openssl/bio.h:790:5: note: to match this ‘(’
790 | int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
| ^
In file included from ../../include/tscore/ink_config.h:40,
from ../../include/tscore/ink_platform.h:27,
from CryptoHash.cc:28:
/usr/include/openssl/bio.h:792:7: error: expected unqualified-id before ‘const’
792 | int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/openssl/bio.h:792:7: error: expected ‘)’ before ‘const’
../../include/ink_autoconf.h:24:37: note: to match this ‘(’
24 | #define BIO_meth_get_destroy(biom) ((biom)->destroy)
| ^
/usr/include/openssl/bio.h:792:7: error: expected ‘)’ before ‘const’
792 | int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~~
../../include/ink_autoconf.h:24:36: note: to match this ‘(’
24 | #define BIO_meth_get_destroy(biom) ((biom)->destroy)
| ^
/usr/include/openssl/bio.h:792:7: error: expected ‘)’ before ‘const’
792 | int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
| ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:16,
from ../../include/tscore/SHA256.h:28,
from CryptoHash.cc:30:
/usr/include/openssl/bio.h:792:5: note: to match this ‘(’
792 | int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
| ^
In file included from ../../include/tscore/ink_config.h:40,
from ../../include/tscore/ink_platform.h:27,
from CryptoHash.cc:28:
../../include/ink_autoconf.h:9:31: error: conflicting declaration of C function ‘const unsigned char* ASN1_STRING_data(const ASN1_STRING*)’
9 | #define ASN1_STRING_get0_data ASN1_STRING_data
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/openssl/evp.h:13,
from ../../include/tscore/SHA256.h:28,
from CryptoHash.cc:30:
/usr/include/openssl/asn1.h:554:1: note: previous declaration ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’
554 | DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
| ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1502: CryptoHash.lo] Error 1
make[2]: Leaving directory '/home/embedur/trafficserver/src/tscore'
make[1]: *** [Makefile:1107: all] Error 2
make[1]: Leaving directory '/home/embedur/trafficserver/src/tscore'
make: *** [Makefile:871: all-recursive] Error 1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
bryancall commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-802326692
@ancjf Could you please supply a PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] rajeshadp commented on issue #7353: static link
Posted by GitBox <gi...@apache.org>.
rajeshadp commented on issue #7353:
URL: https://github.com/apache/trafficserver/issues/7353#issuecomment-1048739496
I am now able to successfully get a static build of ATS using Ermine tool on Ubuntu 20.04, I followed below steps,
build ATS server (by default its dynamic)
git clone https://github.com/apache/trafficserver.git
cd trafficserver/
autoreconf -fi
./configure --prefix=/opt/ats
make
make check
sudo make install
so we now have all artifacts of ATS build at /opt/ats and under /opt/ats/bin/ we have traffic_server binary.
wget http://www.magicermine.com/trial/ErmineLightTrial.x86_64/ErmineLightTrial.x86_64/ErmineLightTrial.x86_64
mv ErmineLightTrial.x86_64 ermine
chmod +x ermine
./ermine YOUR-BINARY -o NEW-PORTABLE-BINARY-NAME
This should create a static build of ATS.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org