Compiling Errors

Technical discussions related to CryptoNote repository and the forking process

Compiling Errors

Postby ikeman32 » Tue Nov 17, 2015 1:32 am

I was doing a test build for my new coin. VetCoin and as luck would have it there were errors. Using Ubuntu 14.04
github: https://github.com/ikeman32/VetCoin

Code: Select all
Determining if files pthread.h exist failed with the following
output:
Change Dir: /VetCoin/build/release/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec3520319180/fas
t"
make[1]: Entering directory `/VetCoin/build/release/CMakeFiles/
CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTryCompileExec3520319180.dir/buil
d.make CMakeFiles/cmTryCompileExec3520319180.dir/build
make[2]: Entering directory `/VetCoin/build/release/CMakeFiles/
CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /VetCoin/build/release/
CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3520319180.dir/Che
ckIncludeFiles.c.o
/usr/bin/cc   -std=c11  -Wall -Wextra -Wpointer-arith -Wundef -
Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=unused
-function -Wno-error=deprecated-declarations -Wno-error=sign-co
mpare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-un
used-parameter -Wno-error=unused-variable -Wno-error=undef -Wno
-error=uninitialized -Wno-error=unused-result -Wlogical-op -Wno
-error=maybe-uninitialized -Wno-error=clobbered -Wno-error=unus
ed-but-set-variable -Waggregate-return -Wnested-externs -Wold-s
tyle-definition -Wstrict-prototypes -march=native -maes    -o C
MakeFiles/cmTryCompileExec3520319180.dir/CheckIncludeFiles.c.o
  -c /VetCoin/build/release/CMakeFiles/CMakeTmp/CheckIncludeFil
es.c
/VetCoin/build/release/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:
5:5: error: function declaration isn’t a prototype [-Werror=str
ict-prototypes]
 int main(){return 0;}
     ^
/VetCoin/build/release/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:
 In function ‘main’:
/VetCoin/build/release/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:
5:5: error: old-style function definition [-Werror=old-style-de
finition]
cc1: all warnings being treated as errors
make[2]: Leaving directory `/VetCoin/build/release/CMakeFiles/C
MakeTmp'
make[2]: *** [CMakeFiles/cmTryCompileExec3520319180.dir/CheckIn
cludeFiles.c.o] Error 1
make[1]: Leaving directory `/VetCoin/build/release/CMakeFiles/C
MakeTmp'
make[1]: *** [cmTryCompileExec3520319180/fast] Error 2

Source:
/* */
#include <pthread.h>


int main(){return 0;}


So what am I missing?
ikeman32
 
Posts: 12
Joined: Tue Nov 17, 2015 1:05 am

Re: Compiling Errors

Postby *tech_star* » Tue Nov 17, 2015 11:29 am

It looks like you've got old version of CMake but pretty new GCC, the thing is they are incompatible. You have to update your CMake:

sudo apt-get update
sudo apt-get upgrade cmake
*tech_star*
 
Posts: 35
Joined: Fri Mar 28, 2014 9:51 am

Re: Compiling Errors

Postby ikeman32 » Tue Nov 17, 2015 7:49 pm

by *tech_star* » Tue Nov 17, 2015 3:29 am
It looks like you've got old version of CMake but pretty new GCC, the thing is they are incompatible. You have to update your CMake:

sudo apt-get update
sudo apt-get upgrade cmake


I updated as you suggested still got errors but fewer this time.

Code: Select all
david@david-VirtualBox:/VetCoin$ more /VetCoin/build/release/CMakeFiles/CMakeError.log
Determining if files pthread.h exist failed with the following
output:
Change Dir: /VetCoin/build/release/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec3520319180/fas
t"
make[1]: Entering directory `/VetCoin/build/release/CMakeFiles/
CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTryCompileExec3520319180.dir/buil
d.make CMakeFiles/cmTryCompileExec3520319180.dir/build
make[2]: Entering directory `/VetCoin/build/release/CMakeFiles/
CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /VetCoin/build/release/
CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec3520319180.dir/Che
ckIncludeFiles.c.o
/usr/bin/cc   -std=c11  -Wall -Wextra -Wpointer-arith -Wundef -
Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=unused
-function -Wno-error=deprecated-declarations -Wno-error=sign-co
mpare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-un
used-parameter -Wno-error=unused-variable -Wno-error=undef -Wno
-error=uninitialized -Wno-error=unused-result -Wlogical-op -Wno

...skipping 22 lines


Here is the output when I run Make.

Code: Select all
david@david-VirtualBox:/VetCoin$ sudo make -j
[sudo] password for david:
mkdir -p build/release
cd build/release && cmake -D CMAKE_BUILD_TYPE=Release ../..
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   date_time
--   chrono
--   regex
--   serialization
--   program_options
-- Found Git: /usr/bin/git
-- Could NOT find Threads (missing:  Threads_FOUND)
CMake Error at src/CMakeLists.txt:81 (set_property):
  set_property could not find TARGET daemon.  Perhaps it has not yet been
  created.


-- Configuring incomplete, errors occurred!
See also "/VetCoin/build/release/CMakeFiles/CMakeOutput.log".
See also "/VetCoin/build/release/CMakeFiles/CMakeError.log".
make: *** [cmake-release] Error 1
ikeman32
 
Posts: 12
Joined: Tue Nov 17, 2015 1:05 am

Re: Compiling Errors

Postby ikeman32 » Wed Nov 18, 2015 3:50 am

Ok I found the problem after attempting a windows build and much trial and error with Cmake. It appears that in the CMakeList.txt file the very last line reads:

Code: Select all
set_property(TARGET daemon PROPERTY OUTPUT_NAME "cryptonoted")


You will notice that the "daemon" is spelled in all lower case but needs to have the "d" as upper case. So it reads:

Code: Select all
set_property(TARGET Daemon PROPERTY OUTPUT_NAME "cryptonoted")


Once I changed that it began to build and is building as I type this. I checked the original repository and this misspelling is present. I found the problem while interestingly enough googling the error I was getting and it lead me to the issues section of the repository.
ikeman32
 
Posts: 12
Joined: Tue Nov 17, 2015 1:05 am

Re: Compiling Errors

Postby Clever Crypto » Thu Nov 19, 2015 11:07 am

Yes, actually this error was noted before by other user here.
https://github.com/cryptonotefoundation ... /issues/13
Devs promised to fix this. I hope they will eventually.
Edit:
p.s. And they did.
Clever Crypto
 
Posts: 33
Joined: Tue May 26, 2015 12:25 pm


Return to Reference Code & Forking

Who is online

Users browsing this forum: No registered users and 2 guests

cron