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

Spack Build Failed with errors about variable not declared in the scope #544

Closed
huqy opened this issue Jan 29, 2019 · 1 comment
Closed

Comments

@huqy
Copy link

huqy commented Jan 29, 2019

Hi, I am using Spack release/v0.12 to install dyninst, I got the following error:

root@n6408:~$ spack install dyninst
==> diffutils is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/diffutils-3.6-5dwmnqweri46qdjcc4nd6bomvzuev6sl
==> bzip2 is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/bzip2-1.0.6-v7wr3uzxz63mxkzjqmdtk5cyxyz5ujlb
==> zlib is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/zlib-1.2.11-uk4hz57lzsxrg5h7dr5qse3ng6nsrwcj
==> boost is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3
==> pkgconf is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/pkgconf-1.4.2-yxvwlmyp5u4pdkn3lvo4nfsyubcysexb
==> ncurses is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/ncurses-6.1-35xlequxd7hfj36ygbw4umttsdf5pgw4
==> readline is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/readline-7.0-r7vc4akeqmhnqtm3vqu255uzntdwjyxv
==> gdbm is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/gdbm-1.14.1-vagbbn7o3qbsh6a273zan3r3yji3gwva
==> perl is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/perl-5.26.2-zkhn4asdvpeqszhvaj4bq7v4jlbvjfws
==> openssl is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/openssl-1.0.2o-4xvr45zmo52tshwmigu4iebuu3rvpafz
==> cmake is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/cmake-3.12.3-eyidnq7kkgyj6pjai3ph57kksxwajrtj
==> xz is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/xz-5.2.4-wpi7jvxu3om6uaf77vr5awgqwfjoiy4a
==> libxml2 is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/libxml2-2.9.8-7hlbldnbfmtzygwxjsyuzwckcmcsy243
==> tar is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/tar-1.30-uraljfqowzfrnuk7h4wb2kkhdv4qzro3
==> gettext is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/gettext-0.19.8.1-3ls7r25tfsslgziizpe3qlsa4r6e6ckr
==> elfutils is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/elfutils-0.173-llmhv6bejvke73e77c4bfjjsjt4lmzfu
==> intel-tbb is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/intel-tbb-2019-6sidokngdefvbugj5ctvneswmj2y5e5t
==> libiberty is already installed in $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/libiberty-2.31.1-72jccb7obangqusix5nvtutg6c7e5yft
==> Installing dyninst
==> Searching for binary cache of dyninst
==> Warning: No Spack mirrors are currently configured
==> No binary for dyninst found: installing from source
==> Using cached archive: $SPACK_ROOT/var/spack/cache/dyninst/dyninst-10.0.0.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.  This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!
==> Staging archive: $SPACK_ROOT/var/spack/stage/dyninst-10.0.0-fpljfnosgahkhhg6i7xgvjtnqpdcfm5n/dyninst-10.0.0.tar.gz
==> Created stage in $SPACK_ROOT/var/spack/stage/dyninst-10.0.0-fpljfnosgahkhhg6i7xgvjtnqpdcfm5n
==> No patches needed for dyninst
==> Building dyninst [Package]
==> Executing phase: 'install'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j72'

8 errors found in build log:
     679                            ^~~~~~~~~~~
     680    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/instructionAPI/src/Operation.C: In member f
            unction 'void Dyninst::InstructionAPI::Operation_impl::SetUpNonOperandData(bool)':
     681    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/instructionAPI/src/Operation.C:403:51: warn
            ing: unused parameter 'needFlags' [-Wunused-parameter]
     682         void Operation_impl::SetUpNonOperandData(bool needFlags)
     683                                                       ^~~~~~~~~
     684    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C: In static me
            mber function 'static bool Dyninst::SymtabAPI::emitElfUtils::updateRelocation(Dyninst::Symta
            bAPI::Symtab*, Dyninst::SymtabAPI::relocationEntry&, int)':
  >> 685    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1665:18: erro
            r: 'R_AARCH64_RELATIVE' was not declared in this scope
     686                 case R_AARCH64_RELATIVE:
     687                      ^~~~~~~~~~~~~~~~~~
     688    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1665:18: note
            : suggested alternative: 'R_PPC64_RELATIVE'
     689                 case R_AARCH64_RELATIVE:
     690                      ^~~~~~~~~~~~~~~~~~
     691                      R_PPC64_RELATIVE
  >> 692    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1669:18: erro
            r: 'R_AARCH64_JUMP_SLOT' was not declared in this scope
     693                 case R_AARCH64_JUMP_SLOT:
     694                      ^~~~~~~~~~~~~~~~~~~
     695    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1669:18: note
            : suggested alternative: 'R_PPC64_JMP_SLOT'
     696                 case R_AARCH64_JUMP_SLOT:
     697                      ^~~~~~~~~~~~~~~~~~~
     698                      R_PPC64_JMP_SLOT
  >> 699    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1678:18: erro
            r: 'R_AARCH64_GLOB_DAT' was not declared in this scope
     700                 case R_AARCH64_GLOB_DAT:
     701                      ^~~~~~~~~~~~~~~~~~
     702    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/emitElfStatic.C:1678:18: note
            : suggested alternative: 'R_PPC64_GLOB_DAT'
     703                 case R_AARCH64_GLOB_DAT:
     704                      ^~~~~~~~~~~~~~~~~~
     705                      R_PPC64_GLOB_DAT

     ...

     739    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/parseStab.C:1940:17: warning:
             this statement may fall through [-Wimplicit-fallthrough=]
     740          nestedType = true;
     741          ~~~~~~~~~~~^~~~~~
     742    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/parseStab.C:1941:2: note: her
            e
     743      case 'u':
     744      ^~~~
  >> 745    make[2]: *** [symtabAPI/CMakeFiles/symtabAPI.dir/src/emitElfStatic.C.o] Error 1
     746    make[2]: *** Waiting for unfinished jobs....
     747    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Symtab.C: In static member fu
            nction 'static bool Dyninst::SymtabAPI::Symtab::openFile(Dyninst::SymtabAPI::Symtab*&, void*
            , size_t, std::__cxx11::string, Dyninst::SymtabAPI::Symtab::def_t)':
     748    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Symtab.C:1985:89: warning: 'n
            ew' of type 'Dyninst::SymtabAPI::Symtab' with extended alignment 128 [-Waligned-new=]
     749        obj = new Symtab((unsigned char *) mem_image, size, name, (def_bin == Defensive), err);
     750                                                                                             ^
     751    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Symtab.C:1985:89: note: uses
            'void* operator new(std::size_t)', which does not have an alignment parameter

     ...

     773             }
     774             ^
     775    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Symtab-edit.C:78:5: note: her
            e
     776         case Symbol::ST_TLS:
     777         ^~~~
     778    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Object-elf.C: In function 'Dy
            ninst::SymtabAPI::Region::RegionType getRelTypeByElfMachine(Dyninst::Elf_X*)':
  >> 779    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Object-elf.C:277:14: error: '
            EM_AARCH64' was not declared in this scope
     780             case EM_AARCH64:
     781                  ^~~~~~~~~~
     782    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Object-elf.C:277:14: note: su
            ggested alternative: 'EM_IA_64'
     783             case EM_AARCH64:
     784                  ^~~~~~~~~~
     785                  EM_IA_64

     ...

     787    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Object-elf.C:4992:12: warning
            : comparison between signed and unsigned integer expressions [-Wsign-compare]
     788              i < allRegionHdrsByShndx.size();
     789              ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     790    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/symtabAPI/src/Object-elf.C:4911:43: warning
            : unused parameter 'elf' [-Wunused-parameter]
     791     bool Object::parse_all_relocations(Elf_X &elf, Elf_X_Shdr *dynsym_scnp,
     792                                               ^~~
  >> 793    make[2]: *** [symtabAPI/CMakeFiles/symtabAPI.dir/src/Object-elf.C.o] Error 1
     794    make[2]: Leaving directory `/work$SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-buil
            d'
  >> 795    make[1]: *** [symtabAPI/CMakeFiles/symtabAPI.dir/all] Error 2
     796    make[1]: *** Waiting for unfinished jobs....
     797    In file included from $SPACK_STAGE/spack-stage-LUN9LB/dyninst/instructionAPI/src/In
            structionDecoder-power.C:911:0:
     798    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/instructionAPI/src/power_opcode_tables.C: I
            n function 'Dyninst::InstructionAPI::power_entry::buildTables()::<lambda()>':
     799    $SPACK_STAGE/spack-stage-LUN9LB/dyninst/instructionAPI/src/power_opcode_tables.C:57
            :38: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying w
            ithout
     800         std::call_once(built_tables, [&]() {
     801                                          ^

     ...

     803    cd $SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-build/instructionAPI && $SPACK_ROOT/opt/spa
            ck/linux-centos6-x86_64/gcc-7.2.0/cmake-3.12.3-eyidnq7kkgyj6pjai3ph57kksxwajrtj/bin/cmake -E
            cmake_link_script CMakeFiles/instructionAPI.dir/link.txt --v erbose=1
     804    $SPACK_ROOT/lib/spack/env/gcc/g++ -fPIC  -std=c++11  -fvisibility=hidd
            en -fvisibility-inlines-hidden -W -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual -Wc
            ast-align -Wno-non-template-friend -Wno-unused-local-typedefs -Wno-deprecated-declarations -
            O2 -g   -Wl,--no-undefined  -shared -Wl,-soname,libinstructionAPI.so.10.0 -o libinstructionA
            PI.so.10.0.0 CMakeFiles/instructionAPI.dir/src/Instruction.C.o CMakeFiles/instructionAPI.dir
            /src/InstructionAST.C.o CMakeFiles/instructionAPI.dir/src/Operation.C.o CMakeFiles/instructi
            onAPI.dir/src/Operand.C.o CMakeFiles/instructionAPI.dir/src/Register.C.o CMakeFiles/instruct
            ionAPI.dir/src/Expression.C.o CMakeFiles/instructionAPI.dir/src/BinaryFunction.C.o CMakeFile
            s/instructionAPI.dir/src/InstructionCategories.C.o CMakeFiles/instructionAPI.dir/src/ArchSpe
            cificFormatters.C.o CMakeFiles/instructionAPI.dir/src/Immediate.C.o CMakeFiles/instructionAP
            I.dir/src/InstructionDecoder.C.o CMakeFiles/instructionAPI.dir/src/InstructionDecoder-x86.C.
            o CMakeFiles/instructionAPI.dir/src/InstructionDecoder-power.C.o CMakeFiles/instructionAPI.d
            ir/src/InstructionDecoder-aarch64.C.o CMakeFiles/instructionAPI.dir/src/InstructionDecoderIm
            pl.C.o  -L$SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1
            .68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib  -L$SPACK_ROOT/opt/spack/li
            nux-centos6-x86_64/gcc-7.2.0/intel-tbb-2019-6sidokngdefvbugj5ctvneswmj2y5e5t/lib -Wl,-rpath,
            $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfd
            guy52my7fh5t3aa222bvarrbv6i3/lib:$SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-buil
            d/common:$SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/intel-tb
            b-2019-6sidokngdefvbugj5ctvneswmj2y5e5t/lib:::::::::::::::::::::::::::::::::::::::::::::::::
            :::::::::: ../common/libcommon.so.10.0.0 $SPACK_ROOT/opt/spack/linux-c
            entos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/libboost_thread-mt
            .so $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-
            ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/libboost_system-mt.so $SPACK_ROOT
            /opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/
            libboost_date_time-mt.so $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gc
            c-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/libboost_timer-mt.so $SPACK_ROOT/o
            pt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3 aa222bvarrbv6i3/lib/l
            ibboost_filesystem-mt.so $SPACK_ROOT/opt/spack/li
            nux-centos6-x86_64/gcc-7.2.0/boost-1.68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/libboost_atom
            ic-mt.so $SPACK_ROOT/opt/spack/linux-centos6-x86_64/gcc-7.2.0/boost-1.
            68.0-ttfdguy52my7fh5t3aa222bvarrbv6i3/lib/libboost_chrono-mt.so -lpthread -ltbb -ltbbmalloc
     805    cd $SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-build/instructionAPI && $SPACK_ROOT/opt/spa
            ck/linux-centos6-x86_64/gcc-7.2.0/cmake-3.12.3-eyidnq7kkgyj6pjai3ph57kksxwajrtj/bin/cmake -E
            cmake_symlink_library libinstructionAPI.so.10.0.0 libinstructionAPI.so.10.0 libinstructionAPI.so
     806    make[2]: Leaving directory `/work/$SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-buil
            d'
     807    [ 24%] Built target instructionAPI
     808    make[1]: Leaving directory `/work/$SPACK_STAGE/spack-stage-LUN9LB/dyninst/spack-buil
            d'
  >> 809    make: *** [all] Error 2

See build log for details:
  $SPACK_ROOT/var/spack/stage/dyninst-10.0.0-fpljfnosgahkhhg6i7xgvjtnqpdcfm5n/dyninst/spack-build.out

Any hints to resolve this? Thanks!

@sashanicolas
Copy link
Contributor

sashanicolas commented Jan 29, 2019

This issue has been solved by commit 58985e9, which is after the release 10.0.
You should select master branch to compile it. I think the parameter should be "develop", see https://github.com/spack/spack/blob/67a1e56e4dee367a45be0c8e3f7a892d915a089c/var/spack/repos/builtin/packages/dyninst/package.py#L17

spack install dyninst@develop

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