Hi Team I am trying to run starrockcs on Ubuntu 22...
# questions-and-troubleshooting
b
Hi Team I am trying to run starrockcs on Ubuntu 22.04 with JDK 17 as per the Ubuntu 22 Server setup steps but getting blocked due to below error, currently checked out tag 4.0.6 I have already all dependencies listed in below command
Copy code
sudo apt install gcc g++ maven openjdk-17-jdk python3 python-is-python3 unzip cmake bzip2 ccache byacc ccache flex automake libtool bison libiberty-dev build-essential ninja-build curl
What could be possible resolution?
Copy code
-- Build files have been written to: /mnt/starrocks/workspace/starrocks/be/build_Release
[129/1358] Building CXX object src/formats/CMakeFiles/Formats.dir/parquet/encoding.cpp.o
FAILED: src/formats/CMakeFiles/Formats.dir/parquet/encoding.cpp.o 
ccache /usr/bin/../bin/g++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DWITH_TENANN -I/mnt/starrocks/workspace/starrocks/be/src/formats/orc/apache-orc/c++/include -I/mnt/starrocks/workspace/starrocks/be/src -I/mnt/starrocks/workspace/starrocks/be/test -I/mnt/starrocks/workspace/starrocks/be/src/gen_cpp/build -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/include/breakpad -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/open_jdk/include -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/open_jdk/include/linux -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/starcache/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/gperftools/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/jemalloc/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include/thrift -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include/event -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/llvm/include -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -Wno-register -Wno-strict-aliasing -fno-omit-frame-pointer -std=gnu++20 -D__STDC_FORMAT_MACROS -Wno-deprecated -Wno-vla -Wno-comment -ffile-prefix-map=/mnt/starrocks/workspace/starrocks/be/build_Release=. -ffile-prefix-map=/mnt/starrocks/workspace/starrocks/be=be -fno-sized-deallocation -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -Werror=return-type -Werror=switch -DWITH_STARCACHE -msse4.2 -mpclmul -mavx2 -mbmi2  -Wno-attributes -DS2_USE_GFLAGS -DS2_USE_GLOG -faligned-new -gz=zlib  -fcoroutines -DSTARROCKS_JIT_ENABLE -g -Wno-unused-local-typedefs -O3 -gdwarf-4 -DNDEBUG -O3 -DNDEBUG -MD -MT src/formats/CMakeFiles/Formats.dir/parquet/encoding.cpp.o -MF src/formats/CMakeFiles/Formats.dir/parquet/encoding.cpp.o.d -o src/formats/CMakeFiles/Formats.dir/parquet/encoding.cpp.o -c /mnt/starrocks/workspace/starrocks/be/src/formats/parquet/encoding.cpp
In file included from /mnt/starrocks/workspace/starrocks/be/src/formats/parquet/encoding.cpp:26:
/mnt/starrocks/workspace/starrocks/be/src/formats/parquet/encoding_plain.h: In member function 'virtual starrocks::Status starrocks::parquet::FLBAPlainDecoder::next_batch(std::size_t, uint8_t*)':
/mnt/starrocks/workspace/starrocks/be/src/formats/parquet/encoding_plain.h:579:26: error: '__builtin_shufflevector' was not declared in this scope; did you mean '__builtin_eh_filter'?
  579 |             __m256i lo = __builtin_shufflevector(cur, fixed_length, 0, 4, 1, 4);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
      |                          __builtin_eh_filter
[133/1358] Building CXX object src/formats/CMakeFiles/Formats.dir/parquet/page_reader.cpp.o
ninja: build stopped: subcommand failed.

real	11m4.966s
user	49m11.961s
sys	4m7.475s
k
is it an arm chipset or x86 chipset?
b
Copy code
Architecture:                x86_64
  CPU op-mode(s):            32-bit, 64-bit
  Address sizes:             46 bits physical, 48 bits virtual
  Byte Order:                Little Endian
CPU(s):                      16
  On-line CPU(s) list:       0-15
Vendor ID:                   GenuineIntel
  Model name:                Intel(R) Xeon(R) CPU @ 2.30GHz
    CPU family:              6
    Model:                   63
    Thread(s) per core:      2
    Core(s) per socket:      8
    Socket(s):               1
    Stepping:                0
    BogoMIPS:                4599.99
    Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqd
                             q ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat md_clear arch_capa
                             bilities
Virtualization features:     
  Hypervisor vendor:         KVM
  Virtualization type:       full
Caches (sum of all):         
  L1d:                       256 KiB (8 instances)
  L1i:                       256 KiB (8 instances)
  L2:                        2 MiB (8 instances)
  L3:                        45 MiB (1 instance)
NUMA:                        
  NUMA node(s):              1
  NUMA node0 CPU(s):         0-15
Vulnerabilities:             
  Gather data sampling:      Not affected
  Indirect target selection: Vulnerable
  Itlb multihit:             Not affected
  L1tf:                      Mitigation; PTE Inversion
  Mds:                       Mitigation; Clear CPU buffers; SMT Host state unknown
  Meltdown:                  Mitigation; PTI
  Mmio stale data:           Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Reg file data sampling:    Not affected
  Retbleed:                  Mitigation; IBRS
  Spec rstack overflow:      Not affected
  Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:                Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop
  Srbds:                     Not affected
  Tsa:                       Not affected
  Tsx async abort:           Not affected
  Vmscape:                   Not affected
k
https://github.com/StarRocks/starrocks/pull/67495 looks similar to what discussed in this PR. could be something related to toolchain setup.
b
It is using gcc 12.3.0 in ubuntu vm, could that be the issue?
Also this PR was closed but not merged, unlikely to have fixed the issue
k
yeah, the author retried and cleaned the error without any code fix.
b
i am upgrading to ubuntu 24.04 and will retry with gcc14
currently failing with gcc13.3.0 and getting below error
Copy code
[870/1084] Building CXX object src/util/CMakeFiles/Util.dir/bfd_parser.cpp.o
FAILED: src/util/CMakeFiles/Util.dir/bfd_parser.cpp.o 
ccache /usr/bin/../bin/g++ -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DWITH_TENANN -I/mnt/starrocks/workspace/starrocks/be/src/formats/orc/apache-orc/c++/include -I/mnt/starrocks/workspace/starrocks/be/src -I/mnt/starrocks/workspace/starrocks/be/test -I/mnt/starrocks/workspace/starrocks/be/src/gen_cpp/build -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/include/breakpad -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/open_jdk/include -I/mnt/starrocks/workspace/starrocks/thirdparty/installed/open_jdk/include/linux -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/starcache/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/gperftools/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/jemalloc/include -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include/thrift -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/include/event -isystem /mnt/starrocks/workspace/starrocks/thirdparty/installed/llvm/include -Wall -Wno-sign-compare -Wno-unknown-pragmas -pthread -Wno-register -Wno-strict-aliasing -fno-omit-frame-pointer -std=gnu++20 -D__STDC_FORMAT_MACROS -Wno-deprecated -Wno-vla -Wno-comment -ffile-prefix-map=/mnt/starrocks/workspace/starrocks/be/build_Release=. -ffile-prefix-map=/mnt/starrocks/workspace/starrocks/be=be -fno-sized-deallocation -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -Werror=return-type -Werror=switch -DWITH_STARCACHE -msse4.2 -mpclmul -mavx2 -mbmi2  -Wno-attributes -DS2_USE_GFLAGS -DS2_USE_GLOG -faligned-new -gz=zlib  -fcoroutines -DSTARROCKS_JIT_ENABLE -g -Wno-unused-local-typedefs -O3 -gdwarf-4 -DNDEBUG -O3 -DNDEBUG -MD -MT src/util/CMakeFiles/Util.dir/bfd_parser.cpp.o -MF src/util/CMakeFiles/Util.dir/bfd_parser.cpp.o.d -o src/util/CMakeFiles/Util.dir/bfd_parser.cpp.o -c /mnt/starrocks/workspace/starrocks/be/src/util/bfd_parser.cpp
/mnt/starrocks/workspace/starrocks/be/src/util/bfd_parser.cpp:37:10: fatal error: bfd.h: No such file or directory
   37 | #include <bfd.h>
      |          ^~~~~~~
compilation terminated.
[874/1084] Building CXX object src/tools/CMakeFiles/Tools.dir/meta_tool.cpp.o
ninja: build stopped: subcommand failed.

real	115m49.164s
user	539m42.403s
sys	33m36.924s
failed at 870/1084 of steps
k
this bfd.h should be already removed from the latest codebase. you need to install binutils-dev in order to find this bfd.h