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

Build fails with Boost 1.71.0 #327

Closed
pnrao opened this issue Oct 9, 2019 · 4 comments
Closed

Build fails with Boost 1.71.0 #327

pnrao opened this issue Oct 9, 2019 · 4 comments

Comments

@pnrao
Copy link

pnrao commented Oct 9, 2019

The current version of Boost has some API changes, leading to errors while building Mozart. The build log is pasted below:

% cd .. && rm -rf build && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev .. && make
-- Build type: Release
-- The CXX compiler identification is GNU 9.2.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.23.0") 
-- The C compiler identification is GNU 9.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Mozart 2.0.1+build.9.46a23c8d-dirty (Fri, 4 Oct 2019 13:33:37 +0200)
-- Building inside the source tree: 'dist' target disabled
-- Found PythonInterp: /usr/bin/python (found version "3.7.4") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components:  random system thread filesystem chrono 
-- Found GMP: /usr/include/gmp.h and /usr/lib/libgmp.so
-- Found Java: /usr/bin/java (found version "13.0.0") found components:  Runtime 
-- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components:  program_options random system thread filesystem chrono 
-- Found GMP: /usr/include/gmp.h and /usr/lib/libgmp.so
-- Using emacs from: /usr/bin/emacs
-- Found Tclsh: /bin/tclsh (found version "8.6") 
-- Found TCL: /usr/lib/libtcl.so  
-- Found TCLTK: /usr/lib/libtcl.so  
-- Found TK: /usr/lib/libtk.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/bluewest/src/mozart2/build
Scanning dependencies of target mozartvm
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/emulate.cc.o
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/memmanager.cc.o
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/gcollect.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/unify.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/sclone.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/vm.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coredatatypes.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coders.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/properties.cc.o
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coremodules.cc.o
In file included from /mnt/bluewest/src/mozart2/vm/vm/main/mozart.hh:35,
                 from /mnt/bluewest/src/mozart2/vm/vm/main/coremodules.cc:25:
/mnt/bluewest/src/mozart2/vm/vm/main/dynbuilders.hh: In function ‘mozart::UnstableNode mozart::buildListDynamic(mozart::VM, size_t, T*, ElemToValue) [with T = mozart::UnstableNode; ElemToValue = mozart::internal::featuresList(mozart::VM, size_t, T*) [with T = mozart::UnstableNode]::<lambda(const mozart::UnstableNode&)>]’:
/mnt/bluewest/src/mozart2/vm/vm/main/dynbuilders.hh:148:25: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  148 |     return UnstableNode();
      |                         ^
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/unpickler.cc.o
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/serializer.cc.o
[  5%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/pickler.cc.o
[  5%] Linking CXX static library libmozartvm.a
[  5%] Built target mozartvm
Scanning dependencies of target genboostsources
[  5%] Built target genboostsources
Scanning dependencies of target mozartvmboost
[  5%] Building CXX object vm/boostenv/main/CMakeFiles/mozartvmboost.dir/boostvm.cc.o
/mnt/bluewest/src/mozart2/vm/boostenv/main/boostvm.cc: In lambda function:
/mnt/bluewest/src/mozart2/vm/boostenv/main/boostvm.cc:342:28: error: ‘class boost::asio::basic_deadline_timer<boost::posix_time::ptime>’ has no member named ‘get_io_service’
  342 |       preemptionTimerCopy->get_io_service().post([preemptionTimerCopy] {
      |                            ^~~~~~~~~~~~~~
make[2]: *** [vm/boostenv/main/CMakeFiles/mozartvmboost.dir/build.make:63: vm/boostenv/main/CMakeFiles/mozartvmboost.dir/boostvm.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:434: vm/boostenv/main/CMakeFiles/mozartvmboost.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
@layus
Copy link
Member

layus commented Oct 9, 2019

Hi, this should be fixed in master, with 4256d3a. Would you mind to give it a try ?

@pnrao
Copy link
Author

pnrao commented Oct 9, 2019

Thank you! This seems to be fixed, but I can't tell you for sure because bug #325 is still blocking my builds. At least it's going past the point where was choking on boost 1.71.0. Here is my current build log, built with JDK-8:

% cd .. && rm -rf build && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev .. && make    
-- Build type: Release
-- The CXX compiler identification is GNU 9.2.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.23.0") 
-- The C compiler identification is GNU 9.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Mozart 2.0.1+build.12.234e1cdc-dirty (Wed, 9 Oct 2019 17:28:54 +0530)
-- Building inside the source tree: 'dist' target disabled
-- Found PythonInterp: /usr/bin/python (found version "3.7.4") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components:  random system thread filesystem chrono 
-- Found GMP: /usr/include/gmp.h and /usr/lib/libgmp.so
-- Found Java: /usr/bin/java (found version "1.8.0.222") found components:  Runtime 
-- Found Boost: /usr/lib64/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components:  program_options random system thread filesystem chrono 
-- Found GMP: /usr/include/gmp.h and /usr/lib/libgmp.so
-- Using emacs from: /usr/bin/emacs
-- Found Tclsh: /bin/tclsh (found version "8.6") 
-- Found TCL: /usr/lib/libtcl.so  
-- Found TCLTK: /usr/lib/libtcl.so  
-- Found TK: /usr/lib/libtk.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/bluewest/src/mozart2/build
Scanning dependencies of target mozartvm
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/emulate.cc.o
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/memmanager.cc.o
[  1%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/gcollect.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/unify.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/sclone.cc.o
[  2%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/vm.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coredatatypes.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coders.cc.o
[  3%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/properties.cc.o
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/coremodules.cc.o
In file included from /mnt/bluewest/src/mozart2/vm/vm/main/mozart.hh:35,
                 from /mnt/bluewest/src/mozart2/vm/vm/main/coremodules.cc:25:
/mnt/bluewest/src/mozart2/vm/vm/main/dynbuilders.hh: In function ‘mozart::UnstableNode mozart::buildListDynamic(mozart::VM, size_t, T*, ElemToValue) [with T = mozart::UnstableNode; ElemToValue = mozart::internal::featuresList(mozart::VM, size_t, T*) [with T = mozart::UnstableNode]::<lambda(const mozart::UnstableNode&)>]’:
/mnt/bluewest/src/mozart2/vm/vm/main/dynbuilders.hh:148:25: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  148 |     return UnstableNode();
      |                         ^
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/unpickler.cc.o
[  4%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/serializer.cc.o
[  5%] Building CXX object vm/vm/main/CMakeFiles/mozartvm.dir/pickler.cc.o
[  5%] Linking CXX static library libmozartvm.a
[  5%] Built target mozartvm
Scanning dependencies of target genboostsources
[  5%] Built target genboostsources
Scanning dependencies of target mozartvmboost
[  5%] Building CXX object vm/boostenv/main/CMakeFiles/mozartvmboost.dir/boostvm.cc.o
[  6%] Building CXX object vm/boostenv/main/CMakeFiles/mozartvmboost.dir/boostenvmodules.cc.o
[  6%] Linking CXX static library libmozartvmboost.a
[  6%] Built target mozartvmboost
Scanning dependencies of target ozemulator
[  8%] Building CXX object boosthost/emulator/CMakeFiles/ozemulator.dir/emulator.cc.o
[  8%] Linking CXX executable ozemulator
[  8%] Built target ozemulator
Scanning dependencies of target bootcompiler
[  8%] Building the bootcompiler
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
[info] Loading settings for project bootcompiler-build from plugins.sbt ...
[info] Loading project definition from /mnt/bluewest/src/mozart2/bootcompiler/project
[info] Loading settings for project bootcompiler from build.sbt ...
[info] Set current project to bootcompiler (in build file:/mnt/bluewest/src/mozart2/bootcompiler/)
[info] Including from cache: scopt_2.11-3.2.0.jar
[info] Including from cache: scala-parser-combinators_2.11-1.0.2.jar
[info] Including from cache: scala-library-2.11.12.jar
[info] Checking every *.class/*.jar file's SHA-1.
[info] Merging files...
[warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
[warn] Strategy 'discard' was applied to a file
[info] Assembly up to date: /mnt/bluewest/src/mozart2/bootcompiler/target/scala-2.11/bootcompiler-assembly-2.0-SNAPSHOT.jar
[success] Total time: 4 s, completed 09-Oct-2019 17:40:05
[  8%] Built target bootcompiler
Scanning dependencies of target gensources
[  8%] Built target gensources
Scanning dependencies of target library_stage_0
[  9%] (stage 0) /mnt/bluewest/src/mozart2/build/lib/stage0/Base.ozf
Fatal error when called with:
  -m /mnt/bluewest/src/mozart2/vm/vm/main/cached// -D NO_GUMP --baseenv -o /mnt/bluewest/src/mozart2/build/lib/stage0/Base.ozf -b /mnt/bluewest/src/mozart2/build/lib/stage0/baseenv0.txt /mnt/bluewest/src/mozart2/lib/main/base/Base.oz
java.util.NoSuchElementException: key not found: <P/1 <TopLevel>>
        at scala.collection.MapLike$class.default(MapLike.scala:228)
        at scala.collection.AbstractMap.default(Map.scala:59)
        at scala.collection.mutable.HashMap.apply(HashMap.scala:65)
        at org.mozartoz.bootcompiler.Serializer.serialize(Serializer.scala:21)
        at org.mozartoz.bootcompiler.Serializer$.serialize(Serializer.scala:227)
        at org.mozartoz.bootcompiler.Main$.org$mozartoz$bootcompiler$Main$$mainBaseEnv(Main.scala:117)
        at org.mozartoz.bootcompiler.Main$$anonfun$main$1.apply(Main.scala:74)
        at org.mozartoz.bootcompiler.Main$.main(Main.scala:67)
        at org.mozartoz.bootcompiler.Main.main(Main.scala)
make[2]: *** [lib/CMakeFiles/library_stage_0.dir/build.make:103: lib/stage0/Base.ozf] Error 2
make[2]: *** Deleting file 'lib/stage0/Base.ozf'
make[1]: *** [CMakeFiles/Makefile2:744: lib/CMakeFiles/library_stage_0.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

IMHO, it's safe to close this bug for now. I'll reopen it if needed at a later date.

@layus
Copy link
Member

layus commented Oct 9, 2019

May I suggest that you compile with a pre-compiled bootcompiler.jar, like the one available on https://github.com/layus/mozart2/releases/tag/v2.0.0-beta.1 ? Just put the downloaded bootcompiler.jar in $src/build/bootcompiler/bootcompiler.jar (if you are building in $src/build) and run make again. This should bypass the bootcompiler.jar generation.

Do no hesitate to continue asking question on #325 as sjrd is very knowledgeable about sbt and scala in general. Reading the thread, it is unsure if you expect some more help from him to fix the issue.

@layus layus closed this as completed Oct 9, 2019
@pnrao
Copy link
Author

pnrao commented Oct 10, 2019

I found a copy of an unadulterated checkout on a different hard disk. I have verified that your changes build correctly, and my oz files compile and run just as before.

sjrd and I have taken the conversation here: #326 (comment)

Per your suggestion, I'll ask for his help again.

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

2 participants