[Ubuntu] Cmake Error

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Hallo,

Aangezien mijn Ubuntu-skills niet super zijn, zou ik willen vragen of jullie deze fout herkennen.
De VPS draait op Ubuntu 14.04 LTS. Miniupnpc is geïnstalleerd.

Na 'cmake .' geeft de terminal het volgende weer:

-- Building without build tag
-- Could not find DEVELOPER_LOCAL_TOOLS in env (not required)
-- BOOST_IGNORE_SYSTEM_PATHS defaults to OFF
-- Could not find DEVELOPER_LIBUNBOUND_OLD in env (not required)
-- Building for a 64-bit system
-- Building internal libraries as static
-- Could not find DATABASE in env (not required unless you want to change database type from default: lmdb)
-- Using LMDB as default DB type
-- Stack trace on exception enabled
CMake Error at cmake/FindMiniupnpc.cmake:51 (if):
  if given arguments:

    "GREATER" "10" "OR" "EQUAL" "10"

  Unknown arguments specified
Call Stack (most recent call first):
  external/CMakeLists.txt:38 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/xxxxxxxx/electroneum/CMakeFiles/CMakeOutput.log".
See also "/home/xxxxxxxx/electroneum/CMakeFiles/CMakeError.log".


Wat zou hier aan de hand kunnen zijn? Hieronder het bestand FindMiniupnpc.make en CMakeError.log:


code: cmake/FindMiniupnpc.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# --------------------------------- FindMiniupnpc Start ---------------------------------
# Locate miniupnp library
# This module defines
#  MINIUPNP_FOUND, if false, do not try to link to miniupnp
#  MINIUPNP_LIBRARY, the miniupnp variant
#  MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family)
#  MINIUPNPC_VERSION_1_7_OR_HIGHER, set if we detect the version of miniupnpc is 1.7 or higher
#
# Note that the expected include convention is
#  #include "miniupnpc.h"
# and not
#  #include <miniupnpc/miniupnpc.h>
# This is because, the miniupnpc location is not standardized and may exist
# in locations other than miniupnpc/

if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY)
    # Already in cache, be silent
    set(MINIUPNP_FIND_QUIETLY TRUE)
endif ()

find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
  HINTS $ENV{MINIUPNP_INCLUDE_DIR}
  PATH_SUFFIXES miniupnpc
)

find_library(MINIUPNP_LIBRARY miniupnpc
  HINTS $ENV{MINIUPNP_LIBRARY}
)

find_library(MINIUPNP_STATIC_LIBRARY libminiupnpc.a
  HINTS $ENV{MINIUPNP_STATIC_LIBRARY}
)

set(MINIUPNP_INCLUDE_DIRS ${MINIUPNP_INCLUDE_DIR})
set(MINIUPNP_LIBRARIES ${MINIUPNP_LIBRARY})
set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
  MiniUPnPc DEFAULT_MSG
  MINIUPNP_INCLUDE_DIR
  MINIUPNP_LIBRARY
)

IF(MINIUPNPC_FOUND)
  file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
  if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
    set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
  endif()

 if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
    message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION})
    set(MINIUPNP_FOUND true)
    set(MINIUPNPC_VERSION_1_7_OR_HIGHER true)
  endif()
ENDIF()

mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY)
# --------------------------------- FindMiniupnpc End ---------------------------------



code: CMakeError.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec518060574/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec518060574.dir/build.make CMakeFiles$
make[1]: Entering directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/xxxxxxxx/electroneum/CMakeFiles/CMake$
Building C object CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.$
Linking C executable cmTryCompileExec518060574
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec518060574.dir/li$
/usr/bin/cc       CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.$
CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.o: In function `ma$
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec518060574] Error 1
make: *** [cmTryCompileExec518060574/fast] Error 2
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec518060574/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec518060574.dir/build.make CMakeFiles$
make[1]: Entering directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/xxxxxxxx/electroneum/CMakeFiles/CMake$
Building C object CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.o
/usr/bin/cc    -o CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.$
Linking C executable cmTryCompileExec518060574
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec518060574.dir/link.txt --verbose=1
/usr/bin/cc       CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.o  -o cmTryCompileExec518060574 -rdynamic
CMakeFiles/cmTryCompileExec518060574.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text+0x16): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec518060574] Error 1
make: *** [cmTryCompileExec518060574/fast] Error 2

File /home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec864971082/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec864971082.dir/build.make CMakeFiles/cmTryCompileExec864971082.dir/build
make[1]: Entering directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec864971082.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec864971082.dir/CheckFunctionExists.c.o   -c /usr/share/cmake-2.8/Modules$
Linking C executable cmTryCompileExec864971082
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec864971082.dir/link.txt --verbose=1
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create    CMakeFiles/cmTryCompileExec864971082.dir/CheckFunctionExists.c.o  -o cmTryCompileExec864971082 -rdyn$
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
make[1]: Leaving directory `/home/xxxxxxxx/electroneum/CMakeFiles/CMakeTmp'
make[1]: *** [cmTryCompileExec864971082] Error 1
make: *** [cmTryCompileExec864971082/fast] Error 2

Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 22:30

Hero of Time

Moderator LNX

There is only one Legend

Ziet eruit alsof de variabele die ze willen controleren geen waarde heeft en dan faalt de IF statement. Heb je een release te pakken die je wilt compileren, of een svn/git/bzr/whatever versie te pakken? Wat is de reden om te gaan compileren als je zo weinig kennis hebt? En wat is je doel met miniupnp?

Daarbij, je bent bezig met compileren. Op Linux. Denk niet dat je iets server specifieks doet hiermee, dus SWS > NOS.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Ik wil eens kijken of het lukt een simpele mining pool te starten. Daarvoor moet ik het volgende compileren:
https://github.com/electroneum/electroneum

Bij het compilen lijkt 'ie enkele checks te doen, waarvan er dus in ieder geval 1 een fout geeft. Heb even op internet gezocht, het zou ook kunnen zijn dat de variabele die gecheckt wordt (MINIUPNPC_API_VERSION) leeg is. Ik weet echter niet hoe ik dat zou kunnen checken.

Acties:
  • 0 Henk 'm!

  • DaMoUsYs
  • Registratie: Januari 2002
  • Laatst online: 29-09 23:52
en eerst snapd installeren en daarna via snap electroneum installeren ?
Lijkt me makkelijker dan zelf compilen, als je dat nog nooit gedaan hebt

Check dit en help mee!


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Dat heb ik als eerste geprobeerd inderdaad, maar daarbij krijg ik "error: snap "electroneum" not found (at least in channel "beta")
"

Acties:
  • 0 Henk 'm!

  • DaMoUsYs
  • Registratie: Januari 2002
  • Laatst online: 29-09 23:52
en als je beta weglaat ?

Check dit en help mee!


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Ook niet.

Acties:
  • 0 Henk 'm!

  • DaMoUsYs
  • Registratie: Januari 2002
  • Laatst online: 29-09 23:52
Dan zou ik het zo 123 ook niet weten

Check dit en help mee!


Acties:
  • 0 Henk 'm!

  • Thralas
  • Registratie: December 2002
  • Laatst online: 30-09 08:10
andydewit schreef op dinsdag 28 november 2017 @ 22:58:
Bij het compilen lijkt 'ie enkele checks te doen, waarvan er dus in ieder geval 1 een fout geeft. Heb even op internet gezocht, het zou ook kunnen zijn dat de variabele die gecheckt wordt (MINIUPNPC_API_VERSION) leeg is.
Ja, dat is precies wat Hero of Time je probeert te vertellen.
Ik weet echter niet hoe ik dat zou kunnen checken.
Even greppen is een goede eerste stap bij dit soort problemen. Je kunt in de makefile ook zien waar hij hem verwacht te vinden, dus ook dat kun je nalopen.

Maar ik vraag me eigenlijk vooral af waarom je alsnog miniupnp aan het bouwen bent als je zegt 'm te hebben geinstalleerd. Heb je Compiling Electroneum from Source goed gelezen en de juiste packages geinstalleerd?

Die CMakeError.log bevat overigens een heel ander euvel, en is nog veel merkwaardiger. Dat kan zo nooit werken (pthreads?).

[ Voor 6% gewijzigd door Thralas op 28-11-2017 23:34 ]


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
In de dependencies list staat Miniupnpc, daarom heb ik die via een apt-get install binnengehaald. Ik heb nogmaals gecheckt of ik alle packages heb geïnstalleerd, en ik mis er geen een.

Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 22:30

Hero of Time

Moderator LNX

There is only one Legend

Als je gaat compileren, heb je de development headers nodig van je dependencies. Als je binary packages installeert, kan de compiler niet controleren wat er nou beschikbaar is.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Sorry, dat begrijp ik niet helemaal. Wat bedoel je precies?

Acties:
  • 0 Henk 'm!

  • Hero of Time
  • Registratie: Oktober 2004
  • Laatst online: 22:30

Hero of Time

Moderator LNX

There is only one Legend

Gewoon apt install miniupnpc-dev uitvoeren. Kijk maar eens naar de omschrijving ervan.

Echt, als je dit al moet vragen, ga dan AUB niet compileren van broncode. Je hebt er geen kaas van gegeten en komt met redelijk triviale vragen die bij de begincursus 'compileren van broncode' aan bod komen.

Ik ben zelf geen ontwikkelaar, maar lees iig wel de instructies om iets te compileren. Staat in 99% van de tijd precies uitgelegd wat je allemaal moet hebben.

Commandline FTW | Tweakt met mate


Acties:
  • 0 Henk 'm!

  • andydewit
  • Registratie: December 2013
  • Laatst online: 05-11-2024
Ben helemaal opnieuw begonnen en Ubuntu 16.04 geïnstalleerd. Had namelijk eerst ook een fout dat Boost niet de vereiste versie (1.58) had. Laatste versie voor 14.04 is 1.55. Vervolgens apt install libminiupnpc-dev gedaan and it's working :-)

Bedankt voor jullie reacties!

Acties:
  • 0 Henk 'm!

  • cyclone
  • Registratie: Juni 2000
  • Laatst online: 30-09 12:13

cyclone

-=Hacking is my life=- (NOT)

Jup installatie was behoorlijk pittig, maar mij is het uiteindelijke gelukt .. *werving en spam wordt niet toegestaan*

[ Voor 44% gewijzigd door Hero of Time op 05-12-2017 22:19 ]

Bij IT-ers gaat alles automatisch, maar niets vanzelf.
Linux is only free if your time has no value...

Pagina: 1