Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial build of template project succeeds but subsequent ones fail #5

Open
jasonbert opened this issue Mar 10, 2019 · 0 comments
Open

Comments

@jasonbert
Copy link

Revisited your work on EOSEasyContract today :), upgraded the binaries and found my old project didn't compile anymore. Created a new project using EOSEasyContract.exe template new --path C:\Work\EOSIO\Projects --name EOSTemplate4, opened in VS Code, ran Ctrl+Shift+B and the compilation was successful (see below).

> Executing task: EOSEasyContract.exe build --path "C:\Work\EOSIO\Projects\EOSTemplate4" --watch <

Begin watching C:\Work\EOSIO\Projects\EOSTemplate4. Build using docker image binaryfocus/eosio_wasm_1.5.1.
Begin EOSIO contract build
Building ...
Check if container EOSCDT-1118910928BD38CC125B186580F38A20 exists
No existing container found
Creating container EOSCDT-1118910928BD38CC125B186580F38A20 from image binaryfocus/eosio_wasm_1.5.1
AttachContainerAsync: EOSCDT-1118910928BD38CC125B186580F38A20
StartContainerAsync: EOSCDT-1118910928BD38CC125B186580F38A20
ExecCreateContainerAsync 1594e1906a3b1342f0d633b50881f9538140bccd15633966272a9398812ed4b4


        =========== BEGIN: Building Contract ===========


-- The C compiler identification is Clang 4.0.1

-- The CXX compiler identification is Clang 4.0.1

-- Check for working C compiler: /usr/bin/clang

-- Check for working C compiler: /usr/bin/clang -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/clang++

-- Check for working CXX compiler: /usr/bin/clang++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Setting up Eosio Wasm Toolchain 1.4.1 at /usr/local/eosio.cdt

-- Configuring done

-- Generating done

-- Build files have been written to: build

Scanning dependencies of target EOSTemplate4.wasm

[ 50%] Building CXX object CMakeFiles/EOSTemplate4.wasm.dir/EOSTemplate4.cpp.o

Warning, empty ricardian clause file
Warning, empty ricardian clause file
Warning, action <hi> does not have a ricardian contract

[100%] Linking CXX executable EOSTemplate4.wasm

[100%] Built target EOSTemplate4.wasm

        =========== END: Building Contract ===========




End EOSIO contract build
Done Building. Build Duration = 00:00:14.4230063

Did a Ctrl+S to trigger the build again and it now fails.

Begin EOSIO contract build
Building ...
Check if container EOSCDT-1118910928BD38CC125B186580F38A20 exists
Existing container found
ExecCreateContainerAsync 4becf8cac8d66f385fff85ac625fd20fff23ed2aab73b73c63b6293756038710


        =========== BEGIN: Building Contract ===========


-- Setting up Eosio Wasm Toolchain 1.4.1 at /usr/local/eosio.cdt

-- Configuring done

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /usr/local/eosio.cdt/bin/eosio-cc
CMAKE_CXX_COMPILER= /usr/local/eosio.cdt/bin/eosio-cpp


-- The C compiler identification is Clang 7.0.0

-- The CXX compiler identification is Clang 7.0.0

-- Check for working C compiler: /usr/local/eosio.cdt/bin/eosio-cc

-- Check for working C compiler: /usr/local/eosio.cdt/bin/eosio-cc -- broken

CMake Error at /usr/local/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/usr/local/eosio.cdt/bin/eosio-cc" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: build/CMakeFiles/CMakeTmp



  Run Build Command:"/usr/bin/make" "cmTC_555d1/fast"

  /usr/bin/make -f CMakeFiles/cmTC_555d1.dir/build.make
  CMakeFiles/cmTC_555d1.dir/build

  make[1]: Entering directory 'build/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_555d1.dir/testCCompiler.c.o

  /usr/local/eosio.cdt/bin/eosio-cc -o
  CMakeFiles/cmTC_555d1.dir/testCCompiler.c.o -c
  build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTC_555d1

  /usr/local/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_555d1.dir/link.txt --verbose=1

  /usr/local/eosio.cdt/bin/eosio-cc
  CMakeFiles/cmTC_555d1.dir/testCCompiler.c.o -o cmTC_555d1

  clang-7: warning: CMakeFiles/cmTC_555d1.dir/testCCompiler.c.o: 'linker'
  input unused [-Wunused-co
mmand-line-argument]

  clang-7: warning: argument unused during compilation: '-ffreestanding'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-fno-builtin'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation:
  '-fno-threadsafe-statics' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-D
  BOOST_DISABLE_ASSERTS' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-D
  BOOST_EXCEPTION_DISABLE' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-Xclang -load'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-Xclang
  /usr/local/eosio.cdt/bin/LLVMEosioApply.so'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation:
  '-fplugin=/usr/local/eosio.cdt/bin/eosio_plugin.so'
  [-Wunused-command-line-argument]

  clang-7: warning: argumen
t unused during compilation: '-mllvm
  -use-cfl-aa-in-codegen=both' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include/libcxx'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include/libc' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-O3'
  [-Wunused-command-line-argument]

  CMakeFiles/cmTC_555d1.dir/build.make:97: recipe for target 'cmTC_555d1'
  failed

  make[1]: *** [cmTC_555d1] Error 255

  make[1]: Leaving directory 'build/CMakeFiles/CMakeTmp'

  Makefile:126: recipe for target 'cmTC_555d1/fast' failed

  make: *** [cmTC_555d1/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2
(project)



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

-- The C compiler identification is Clang 7.0.0

-- The CXX compiler identification is Clang 7.0.0

-- Check for working C compiler: /usr/local/eosio.cdt/bin/eosio-cc

-- Check for working C compiler: /usr/local/eosio.cdt/bin/eosio-cc -- broken

CMake Error at /usr/local/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
  The C compiler "/usr/local/eosio.cdt/bin/eosio-cc" is not able to compile a
  simple test program.

  It fails with the following output:

   Change Dir: build/CMakeFiles/CMakeTmp



  Run Build Command:"/usr/bin/make" "cmTC_c4eea/fast"

  make[1]: Entering directory 'build/CMakeFiles/CMakeTmp'

  /usr/bin/make -f CMakeFiles/cmTC_c4eea.dir/build.make
  CMakeFiles/cmTC_c4eea.dir/build

  make[2]: Entering directory 'build/CMakeFiles/CMakeTmp'

  Building C object CMakeFiles/cmTC_c4eea.dir/testCCompiler.c.o

  /usr/local/eosio.cdt/bin/eosio-cc -o
  CMakeFiles/cmTC_c4eea.dir/testCCompiler.c.o -c
  build/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTC_c4eea

  /usr/local/bin/cmake -E cmake_link_script
  CMakeFiles/cmTC_c4eea.dir/link.txt --verbose=1

  /usr/local/eosio.cdt/bin/eosio-cc
  CMakeFiles/cmTC_c4eea.dir/testCCompiler.c.o -o cmTC_c4eea

  clang-7: warning: CMakeFiles/cmTC_
c4eea.dir/testCCompiler.c.o: 'linker'
  input unused [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-ffreestanding'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-fno-builtin'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation:
  '-fno-threadsafe-statics' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-D
  BOOST_DISABLE_ASSERTS' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-D
  BOOST_EXCEPTION_DISABLE' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-Xclang -load'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-Xclang
  /usr/local/eosio.cdt/bin/LLVMEosioApply.so'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation:
  '-fplugin=/usr/local/eosio.cdt/bin/eosio_plugin.so
'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-mllvm
  -use-cfl-aa-in-codegen=both' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include/libcxx'
  [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include/libc' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-I
  /usr/local/eosio.cdt/bin/../include' [-Wunused-command-line-argument]

  clang-7: warning: argument unused during compilation: '-O3'
  [-Wunused-command-line-argument]

  CMakeFiles/cmTC_c4eea.dir/build.make:97: recipe for target 'cmTC_c4eea'
  failed

  make[2]: *** [cmTC_c4eea] Error 255

  make[2]: Leaving directory 'build/CMakeFiles/CMakeTmp'

  Makefile:126: recipe for target 'cmTC_c4eea/fast' failed

  make[1]: *** [cmTC_c4eea/fast] Error 2

  make[1]: Leaving directory 'build/CMakeFiles/CMak
eTmp'





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)



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

Makefile:176: recipe for target 'cmake_check_build_system' failed

make: *** [cmake_check_build_system] Error 1

        =========== END: Building Contract ===========




End EOSIO contract build
Done Building. Build Duration = 00:00:04.2739030

Looks like the CMakeCache.txt file is created with different values from the initial build.

//cxx
CMAKE_CXX_COMPILER:PATH=/usr/local/eosio.cdt/bin/eosio-cpp

//LLVM archiver
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/local/eosio.cdt/bin/llvm-ar

//Generate index for LLVM archive
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/local/eosio.cdt/bin/llvm-ranlib

//cc
CMAKE_C_COMPILER:PATH=/usr/local/eosio.cdt/bin/eosio-cc

//LLVM archiver
CMAKE_C_COMPILER_AR:FILEPATH=/usr/local/eosio.cdt/bin/llvm-ar

//Generate index for LLVM archive
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/local/eosio.cdt/bin/llvm-ranlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant