Open ghost opened 7 years ago
Same error for me after updating to Ubuntu 17.10
➜ cjdns git:(master) uname -a
Linux bonus-soup 4.13.0-16-lowlatency #19-Ubuntu SMP PREEMPT Wed Oct 11 19:51:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
➜ cjdns git:(master) lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
➜ cjdns git:(master) dpkg -l | grep libuv
ii libuv0.10:amd64 0.10.36-4 amd64 asynchronous event notification library - runtime library
ii libuv0.10-dev:amd64 0.10.36-4 amd64 asynchronous event notification library - development files
ii libuv1:amd64 1.9.1-3 amd64 asynchronous event notification library - runtime library
➜ cjdns git:(master)
error:
Building C object subnode/PingResponder.c complete
Total build time: 19955ms.
/opt/cjdns/node_build/builder.js:719
if (err) { throw err; }
^
Error: gcc -Wl,-z,relro,-z,now,-z,noexecstack,-pie,-flto,-O3 -o build_linux/crypto_random_randombytes_c build_linux/util_Assert_c.o,build_linux/util_Bits_c.o,build_linux/memory_Allocator_c.o,build_linux/util_CString_c.o,build_linux/exception_Except_c.o,build_linux/util_log_Log_c.o,build_linux/crypto_random_seed_RandomSeed_c.o,build_linux/crypto_random_seed_DevUrandomRandomSeed_c.o,build_linux/util_Hex_c.o,build_linux/crypto_random_seed_LinuxRandomUuidSysctlRandomSeed_c.o,build_linux/crypto_random_seed_ProcSysKernelRandomUuidRandomSeed_c.o,build_linux/crypto_random_seed_GetEntropyRandomSeed_c.o,build_linux/crypto_random_seed_SystemRandomSeed_c.o,build_linux/crypto_random_Random_c.o,build_linux/memory_MallocAllocator_c.o,build_linux/crypto_random_randombytes_c.o build_linux/dependencies/cnacl/jsbuild/libnacl.a,build_linux/dependencies/libuv/out/Release/libuv.a,-lpthread,-lrt
gcc: error: build_linux/dependencies/libuv/out/Release/libuv.a: No such file or directory
at error (/opt/cjdns/node_build/builder.js:53:15)
at /opt/cjdns/node_build/builder.js:122:22
at /opt/cjdns/node_build/builder.js:92:13
at ChildProcess.<anonymous> (/opt/cjdns/tools/lib/Semaphore.js:7:30)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Socket.<anonymous> (internal/child_process.js:351:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
Also on Ubuntu 17.10, @johnnagro I think that's not the real error here.
I think the problem is in the Libuv build python script:
Initialize 14ms
{"isLLVM":false,"isClang":false,"isGCC":true,"version":"7.2.0"}
testing python python
sys.version_info(major=2, minor=7, micro=14, releaselevel='final', serial=0)
Build Libuv
Traceback (most recent call last):
File "./gyp_uv.py", line 81, in <module>
(major, minor), is_clang = compiler_version()
ValueError: need more than 1 value to unpack
make: *** out: No such file or directory. Stop.
Configure 59ms
Scan for out of date files 2ms
Compiler supports link time optimization
Building C object contrib/c/publictoip6.c complete
Building C object contrib/c/mkpasswd.c complete
Building C object crypto/random/randombytes.c complete
Building C object contrib/c/makekeys.c complete
*continues on to no such file or directory error you mentioned*
So then Libuv didn't get built and the do
script continues on without libuv being successfully built.
Root cause found for the script:
# cc -dumpversion
7
While the compiler_version()
function in node_build/dependencies/libuv/gyp_uv.py
expected two numbers like 7.0
instead. It didn't get two, so it created a tuple of one item, which wasn't enough to unpack.
Hack:
def compiler_version():
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
is_clang = 'clang' in proc.communicate()[0].split('\n')[0]
proc = subprocess.Popen(CC.split() + ['-dumpversion'], stdout=subprocess.PIPE)
version = proc.communicate()[0].split('.')
version = map(int, version[:2])
version = tuple(version)
if len(version) == 1: # HACK/TODO/FIXME
print("Editing compiler_version(): " + str(version) + " len " + str(len(version)))
version = (version[0], 0)
print("After edit: " + str(version) + " len " + str(len(version)))
return (version, is_clang)
"Set the second item in the tuple to zero if it doesn't exist."
Now I've got another set of errors, seemingly unrelated to this issue though.
Perhaps there's an easier way if we could set the GCC version to 6 or 5,
robo@robo-unseptium ~/c/cjdns robobenklein/libuv-python-fix-1 ● cc -dumpversion
7
robo@robo-unseptium ~/c/cjdns robobenklein/libuv-python-fix-1 ● gcc -dumpversion
7
robo@robo-unseptium ~/c/cjdns robobenklein/libuv-python-fix-1 ● gcc-6 -dumpversion
6.4.0
robo@robo-unseptium ~/c/cjdns robobenklein/libuv-python-fix-1 ● gcc-5 -dumpversion
5.4.1
robo@robo-unseptium ~/c/cjdns robobenklein/libuv-python-fix-1 ● gcc-7 --version
gcc-7 (Ubuntu 7.2.0-8ubuntu3) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Why gcc-7 doesn't output 7.2.0
for -dumpversion
is beyond me.
@robobenklein wow thanks for digging into this more. i tried to use both gcc 5 and 6 (via CC='gcc-5' ./do
method) and neither seemed to work, seemed to fail tests
@robobenklein looks like the node_build
libuv you reference is an old version cloned off the old joyent repo (read the node_build/dependencies/get_libuv.sh
script)
That's strange because this was freshly cloned off of master, so do we just need a submodule version bump?
@robobenklein i'd say so, looks like v0.11.19 is what is checked-in for cjdns, and https://github.com/libuv/libuv is at 1.0
I'm not sure if this error is related to the libuv problem or not, but this is what I get using https://github.com/cjdelisle/cjdns/commit/14a83fc4656241d69b4f53145ab6d66b799030e7 :
*other tests...*
Running test Endian_test 0.1 ms
Running test Hex_test 0.35 ms
Running test Identity_test 0.1 ms
Running test Map_fuzz_test 0.1 ms
Running test Map_test 0.506 ms
Running test Process_testAssertion failure [Process_test.c:75] [(!"timed out.")]
Assertion failure [Process_test.c:75] [(!"timed out.")]
Checking codestyle
memory/Allocator.c:237 TODO(cjd): make this optional.
net/Benchmark.c:192 TODO(cjd): this will fail with a different encoding scheme
wire/PFChan.h:288 * TODO(cjd): This doesn't cover all control message types yet.
admin/angel/Core.c:81 TODO(cjd): we need to begin detecting MTU and informing the OS properly!
benc/serialization/json/JsonBencSerializer.c:331 FIXME(gerard): silently skipping anything we don't understand
client/Configurator.c:569 * FIXME(sdg): moving noforks after setuser might make nproc <- 0,0 work
./interface/tuntap/test/TUNInterface_ipv4_root_test.c:59 TODO(cjd): fix TUNConfigurator_addIp4Address() for Illumos, BSD.
dht/dhtcore/NodeStore.h:160 * FIXME(arceliar): Documentation is out of date
./tunnel/test/IpTunnel_test.c:391 Allocator_free(alloc); //TODO(cjd): This is caused by an allocator bug.
./test/Beacon_test.c:16 TODO(cjd): Subnode beacon testing
net/InterfaceController.c:857 TODO(cjd): eps are created in 3 places, there should be a factory function.
switch/SwitchCore.c:19 TODO(cjd): Get rid of NumberCompress so we can set encodingScheme at runtime.
switch/SwitchCore.c:224 TODO(cjd): hmm should we return an error packet?
interface/tuntap/NDPServer.c:128 TODO(cjdns, Kubuxu): Filtering basing on cjdns network and tunnels.
dht/DHTModuleRegistry.c:64 TODO(cjd): Call a debugger with all unhandlable messages?
memory/BufferAllocator.c:25 * TODO(cjd): addOnFreeJob adds a job which is only run when the root allocator is freed
dht/dhtcore/Janitor.c:239 FIXME(arceliar): Probably need stronger requirements than this.
dht/dhtcore/Janitor.c:398 FIXME(arceliar): This target probably isn't optimal.
dht/dhtcore/RouterModule.c:85 * TODO(cjd): ---
subnode/ReachabilityAnnouncer.c:365 TODO(cjd): else if the peer is dropped...
subnode/ReachabilityAnnouncer.c:524 TODO(cjd): This implies a risk of oscillation wherein there is always a tiny bit of
dht/dhtcore/NodeStore.c:669 TODO(cjd): This does not depend on nodeStore or alter the link, consider moving to Node.c
dht/dhtcore/NodeStore.c:900 FIXME(arceliar,cjd): linking every node with 0 link cost, this can't be right.
dht/dhtcore/NodeStore.c:1212 TODO(arceliar): protect keyspace, evict the worst bestParent instead?
dht/dhtcore/NodeStore.c:1292 TODO(arceliar) the 1023 here is pretty arbitrary...
dht/dhtcore/NodeStore.c:1294 TODO(arceliar): is this safe?
dht/dhtcore/NodeStore.c:1522 TODO(cjd): this could return ~0
dht/dhtcore/NodeStore.c:1542 TODO(cjd): this has been the source of assert failures and we might be sweeping
dht/dhtcore/NodeStore.c:1641 TODO(cjd): Schlameil the painter
dht/dhtcore/NodeStore.c:2033 FIXME(arceliar): calcNextCost is guessing what the cost would stabilize to
dht/dhtcore/NodeStore.c:2052 TODO(cjd): What we really should be doing here is storing this link in a
Failed to build cjdns.
Total build time: 14430ms.
The libuv build issue on Fedora 26 was already fixed in the crashey branch, you might checkout the crashey branch to verify it.
@madafoo @robobenklein I can confirm that the crashey
branch builds cleanly and seems to run fine on Ubuntu 17.10 :+1:
Well it's not an error with libuv, but a test fails after compilation:
Running test Process_testAssertion failure [Process_test.c:75] [(!"timed out.")]
Assertion failure [Process_test.c:75] [(!"timed out.")]
Strange because it "times out" instantly...
Not too concerned tho, probably just gonna use a docker container anyways.
@robobenklein the process timeout issue is also fixed in the crashy branch, see https://github.com/cjdelisle/cjdns/pull/1107
@madafoo I got that error while testing the current crashey branch, so something must have changed again...
Same here, I can't build on my ubuntu 17.10 server, even with the crashy branch.
This issue can be closed now. Newer releases have fixed the issue.
Hi there. got last and updated fedora 26. Trying to compile cjdns:
locate libuv.a /usr/lib64/libuv.a
rpm -qa | grep libuv libuv-static-1.11.0-1.fc26.x86_64 libuv-1.11.0-1.fc26.x86_64 libuv-devel-1.11.0-1.fc26.x86_64
Has setuid keepNetAdmin Total build time: 28516ms. /home/sm1ly/cjdns/node_build/builder.js:719 if (err) { throw err; } ^
Error: gcc -Wl,-z,relro,-z,now,-z,noexecstack,-pie,-flto,-O3 -o build_linux/contrib_c_mkpasswd_c build_linux/util_Assert_c.o,build_linux/util_Bits_c.o,build_linux/memory_Allocator_c.o,build_linux/util_CString_c.o,build_linux/exception_Except_c.o,build_linux/util_log_Log_c.o,build_linux/crypto_random_seed_RandomSeed_c.o,build_linux/crypto_random_seed_DevUrandomRandomSeed_c.o,build_linux/util_Hex_c.o,build_linux/crypto_random_seed_LinuxRandomUuidSysctlRandomSeed_c.o,build_linux/crypto_random_seed_ProcSysKernelRandomUuidRandomSeed_c.o,build_linux/crypto_random_seed_GetEntropyRandomSeed_c.o,build_linux/crypto_random_seed_SystemRandomSeed_c.o,build_linux/crypto_random_Random_c.o,build_linux/memory_MallocAllocator_c.o,build_linux/contrib_c_mkpasswd_c.o build_linux/dependencies/cnacl/jsbuild/libnacl.a,build_linux/dependencies/libuv/out/Release/libuv.a,-lpthread,-lrt
gcc: error: build_linux/dependencies/libuv/out/Release/libuv.a: No such file or directory
UPD: also got error at start building: testing python python sys.version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0)
Build Libuv Traceback (most recent call last): File "./gyp_uv.py", line 81, in
(major, minor), is_clang = compiler_version()
ValueError: need more than 1 value to unpack
make: *** out: No such file or directory. Stop.
Configure 6169ms
UPD2: i just copied my /usr/lib64/lubuv.a to build_linux/dependencies/libuv/out/Release/libuv.a
and now I got:
/home/sm1ly/cjdns/node_build/builder.js:719 if (err) { throw err; } ^
Error: gcc -Wl,-z,relro,-z,now,-z,noexecstack,-pie,-flto,-O3 -o build_linux/client_cjdroute2_c build_linux/util_CString_c.o,build_linux/exception_Except_c.o,build_linux/util_Assert_c.o,build_linux/util_Bits_c.o,build_linux/memory_Allocator_c.o,build_linux/benc_String_c.o,build_linux/util_Hex_c.o,build_linux/util_Base10_c.o,build_linux/util_platform_Sockaddr_c.o,build_linux/benc_Dict_c.o,build_linux/util_log_Log_c.o,build_linux/util_events_libuv_EventBase_c.o,build_linux/benc_List_c.o,build_linux/benc_serialization_standard_BencMessageReader_c.o,build_linux/benc_serialization_standard_BencMessageWriter_c.o,build_linux/benc_serialization_cloner_Cloner_c.o,build_linux/util_events_libuv_Timeout_c.o,build_linux/client_AdminClient_c.o,build_linux/util_events_libuv_Time_c.o,build_linux/admin_Admin_c.o,build_linux/crypto_random_seed_RandomSeed_c.o,build_linux/crypto_random_seed_DevUrandomRandomSeed_c.o,build_linux/crypto_random_seed_LinuxRandomUuidSysctlRandomSeed_c.o,build_linux/crypto_random_seed_ProcSysKernelRandomUuidRandomSeed_c.o,build_linux/crypto_random_seed_GetEntropyRandomSeed_c.o,build_linux/crypto_random_seed_SystemRandomSeed_c.o,build_linux/crypto_random_Random_c.o,build_linux/util_version_Version_c.o,build_linux/memory_BufferAllocator_c.o,build_linux/util_AddrTools_c.o,build_linux/util_platform_netdev_NetPlatform_linux_c.o,build_linux/util_platform_netdev_NetDev_c.o,build_linux/util_ArrayList_c.o,build_linux/tunnel_RouteGen_c.o,build_linux/crypto_AddressCalc_c.o,build_linux/tunnel_IpTunnel_c.o,build_linux/interface_ASynchronizer_c.o,build_linux/util_events_libuv_FakeNetwork_c.o,build_linux/admin_AdminLog_c.o,build_linux/io_FileWriter_c.o,build_linux/admin_angel_InterfaceWaiter_c.o,build_linux/crypto_CryptoAuth_c.o,build_linux/admin_AuthorizedPasswords_c.o,build_linux/crypto_random_libuv_LibuvEntropyProvider_c.o,build_linux/crypto_Key_c.o,build_linux/dht_Address_c.o,build_linux/subnode_AddrSet_c.o,build_linux/switch_EncodingScheme_c.o,build_linux/util_Pinger_c.o,build_linux/subnode_MsgCore_c.o,build_linux/net_SwitchPinger_c.o,build_linux/io_ArrayWriter_c.o,build_linux/io_ArrayReader_c.o,build_linux/dht_dhtcore_VersionList_c.o,build_linux/dht_dhtcore_ReplySerializer_c.o,build_linux/subnode_SupernodeHunter_c.o,build_linux/subnode_BoilerplateResponder_c.o,build_linux/subnode_GetPeersResponder_c.o,build_linux/subnode_PingResponder_c.o,build_linux/subnode_ReachabilityCollector_c.o,build_linux/crypto_Sign_c.o,build_linux/subnode_ReachabilityAnnouncer_c.o,build_linux/subnode_SubnodePathfinder_c.o,build_linux/subnode_SupernodeHunter_admin_c.o,build_linux/subnode_ReachabilityCollector_admin_c.o,build_linux/dht_DHTModuleRegistry_c.o,build_linux/dht_ReplyModule_c.o,build_linux/dht_dhtcore_Node_c.o,build_linux/dht_dhtcore_RumorMill_c.o,build_linux/dht_dhtcore_NodeStore_c.o,build_linux/dht_EncodingSchemeModule_c.o,build_linux/dht_SerializationModule_c.o,build_linux/util_AverageRoller_c.o,build_linux/dht_dhtcore_RouterModule_c.o,build_linux/dht_dhtcore_SearchStore_c.o,build_linux/dht_dhtcore_SearchRunner_c.o,build_linux/dht_dhtcore_Router_c.o,build_linux/dht_dhtcore_RouterModule_admin_c.o,build_linux/dht_dhtcore_SearchRunner_admin_c.o,build_linux/dht_dhtcore_NodeStore_admin_c.o,build_linux/dht_dhtcore_Janitor_c.o,build_linux/dht_dhtcore_Janitor_admin_c.o,build_linux/dht_Pathfinder_c.o,build_linux/util_events_libuv_UDPAddrIface_c.o,build_linux/util_events_libuv_Pipe_c.o,build_linux/interface_tuntap_TUNInterface_linux_c.o,build_linux/interface_tuntap_AndroidWrapper_c.o,build_linux/switch_Penalty_c.o,build_linux/switch_SwitchCore_c.o,build_linux/net_EventEmitter_c.o,build_linux/net_PeerLink_c.o,build_linux/net_InterfaceController_c.o,build_linux/interface_UDPInterface_admin_c.o,build_linux/util_platform_Socket_c.o,build_linux/util_events_libuv_Event_c.o,build_linux/interface_ETHInterface_linux_c.o,build_linux/interface_ETHInterface_admin_c.o,build_linux/net_InterfaceController_admin_c.o,build_linux/interface_addressable_PacketHeaderToUDPAddrIface_c.o,build_linux/interface_FramingIface_c.o,build_linux/memory_MallocAllocator_c.o,build_linux/memory_Allocator_admin_c.o,build_linux/net_SwitchPinger_admin_c.o,build_linux/net_SessionManager_c.o,build_linux/net_UpperDistributor_c.o,build_linux/net_UpperDistributor_admin_c.o,build_linux/tunnel_IpTunnel_admin_c.o,build_linux/tunnel_RouteGen_admin_c.o,build_linux/util_events_libuv_FileNo_c.o,build_linux/util_events_libuv_FileNo_admin_c.o,build_linux/util_log_WriterLog_c.o,build_linux/util_log_FileWriterLog_c.o,build_linux/util_log_IndirectLog_c.o,build_linux/util_ArchInfo_c.o,build_linux/util_Seccomp_c.o,build_linux/util_Setuid_linux_c.o,build_linux/util_Security_c.o,build_linux/util_Security_admin_c.o,build_linux/net_SessionManager_admin_c.o,build_linux/net_ControlHandler_c.o,build_linux/net_TUNAdapter_c.o,build_linux/net_NetCore_c.o,build_linux/admin_angel_Core_c.o,build_linux/client_Configurator_c.o,build_linux/benc_serialization_json_JsonBencSerializer_c.o,build_linux/io_FileReader_c.o,build_linux/util_events_libuv_Process_c.o,build_linux/util_SysInfo_c.o,build_linux/net_Benchmark_c.o,build_linux/client_cjdroute2_c.o build_linux/dependencies/cnacl/jsbuild/libnacl.a,build_linux/dependencies/libuv/out/Release/libuv.a,-lpthread,-lrt
build_linux/util_events_libuv_FileNo_c.o: In function
connected': /home/sm1ly/cjdns/util/events/libuv/FileNo.c:137: undefined reference to
uv_read2_start' collect2: error: ld returned 1 exit statusPS: ppl... group development tools doesnt install a lot of things, like gcc.... automake... u should change manual to: sudo dnf group install "C Development Tools and Libraries"