Software Archive
Read-only legacy content
17061 Discussions

GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference

Andrey_Vladimirov
New Contributor III
13,417 Views

We are trying to set up a Gentoo-based system (4.0.5 kernel) as a development workstation capable of compiling offload applications for Xeon Phi. Because Gentoo does not work with RPMs, we installed MPSS 3.5.2 by extracting the RPM and placing the files in place. This procedure is described in Section 4 of this paper: http://colfaxresearch.com/installing-intel-mpss-3-3-in-arch-linux/ ; . In Arch Linux for MPSS 3.3 the procedure resulted in functional MPSS that was able to drive the Xeon Phi. Our current task is much simpler: we are not trying to run MPSS, we just want to use it to allow the Intel compiler to compile offload applications.

The problem is below. The minimal reproducer code is

int main() {
#pragma offload target(mic)
  {
    printf("Hi\n");
  }
}

The compilation error is:

$ icpc minimal_reproducer.cc
x86_64-k1om-linux-ld: relocation error: /lib/libc.so.6: symbol _dl_find_dso_for_object, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference

This is probably just an issue with missing files or environment variables, but I am at loss as where to look. The compiler version is 2016.0.109. It is `stable' gentoo with a glibc 2.20

Any pointers would be much appreciated!

0 Kudos
5 Replies
JJK
New Contributor III
13,417 Views

does the code compile without the #pragma set ?

the warning you're seeing is most often seen if there's a mismatch between libc.so and libdl.so (aka ld-linux.so)

Also, note that in order to compile  stuff you only need two RPMs from the mpss stack

  • mpss-sdk-k1om
  • intel-composerxe-compat-k1om

but I must say that I've never tried this on gentoo ...

 

0 Kudos
Andrey_Vladimirov
New Contributor III
13,417 Views

Thank you, JJK!

Without #pragma offload target(mic) but with "-mmic" the same error occurs.

The mismatch that you mention - is it in the system libc and libdl or in their MPSS counterparts?

Do you have any advice on how to resolve this?

0 Kudos
JJK
New Contributor III
13,417 Views

try compiling the code with "icpc -v" . I just installed icc 16 on a Fedora 20 box (libc 2.18) and got the following result:

icc version 16.0.0 (gcc version 4.8.3 compatibility)
/opt/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/mcpcom    
  -mGLOB_em64t=TRUE -mP1OPT_version=16.0-intel64 
  -mGLOB_diag_file=/tmp/iccDQNh0O.diag 
  -mP1OPT_print_version=FALSE 
  -mCG_use_gas_got_workaround=F 
  -mP2OPT_align_option_used=TRUE 
  -mGLOB_gcc_version=483 
  "-mGLOB_options_string= -v -openmp" 
  -mGLOB_cxx_limited_range=FALSE 
  -mCG_extend_parms=FALSE 
  -mGLOB_compiler_bin_directory=/opt/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64 
  -mGLOB_as_output_backup_file_name=/tmp/iccGrSJ1das_.s 
  -mGLOB_dashboard_use_source_name 
  -mIPOPT_activate 
  -mGLOB_product_id_code=0x22006d91 
  -mP3OPT_use_mspp_call_convention 
  -mP2OPT_subs_out_of_bound=FALSE 
  -mP2OPT_disam_type_based_disam=2 
  -mP2OPT_disam_assume_ansi_c 
  -mP2OPT_checked_disam_ansi_alias=TRUE 
  -mGLOB_ansi_alias 
  -mPGOPTI_value_profile_use=T 
  -mGLOB_opt_report_use_source_name 
  -mPAROPT_openmp=TRUE 
  -mP2OPT_il0_array_sections=TRUE 
  -mGLOB_offload_mode=1 
  -mP2OPT_offload_unique_var_string=icc010205021922CfT1fO 
  -mP2OPT_hlo 
  -mP2OPT_hpo_rtt_control=0 
  -mIPOPT_args_in_regs=0 
  -mP2OPT_disam_assume_nonstd_intent_in=FALSE 
  -mGLOB_imf_mapping_library=/opt/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/libiml_attr.so 
  -mPGOPTI_gen_threadsafe_level=0 
  -mIPOPT_link 
  -mIPOPT_ipo_activate 
  -mIPOPT_mo_activate 
  -mIPOPT_source_files_list=/tmp/iccslispdtWT4 
  -mIPOPT_mo_global_data 
  -mIPOPT_link_script_file=/tmp/iccscript2Z8Ps9 
  "-mIPOPT_cmdline_link="/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crt1.o" 
  "/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crti.o" 
  "/usr/lib/gcc/x86_64-redhat-linux/4.8.3/crtbegin.o" 
  "/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin/ofldbegin.o"
  "--eh-frame-hdr" 
  "--build-id" 
  "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" 
  "-m" "elf_x86_64" 
  "-o" "a.out" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/../compiler/lib/intel64" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/lib/intel64" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64"
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/intel64/gcc4.4" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/lib/intel64_lin" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/../tbb/lib/intel64_lin/gcc4.4"
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/../compiler/lib/intel64_lin"
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin"
  "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/"
  "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64"
  "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/" 
  "-L/lib/../lib64" 
  "-L/lib/../lib64/" 
  "-L/usr/lib/../lib64" 
  "-L/usr/lib/../lib64/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/../compiler/lib/intel64/"
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/ipp/lib/intel64/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/tbb/lib/intel64/gcc4.4/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/lib/intel64_lin/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/../tbb/lib/intel64_lin/gcc4.4/" 
  "-L/opt/intel/compilers_and_libraries_2016.0.109/linux/daal/../compiler/lib/intel64_lin/" 
  "-L/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../" 
  "-L/lib64" 
  "-L/lib/" 
  "-L/usr/lib64" 
  "-L/usr/lib" 
  "/tmp/iccDQNh0O.o" 
  "/tmp/iccffkzrc.o" 
  "-Bdynamic" 
  "-Bstatic" "-limf" "-lsvml" "-lirng" 
  "-Bdynamic"  "-lm" "
  "-Bstatic" "-lipgo" "-ldecimal" 
  "-Bdynamic" "-liomp5" "-loffload" 
  "--as-needed" "-lcilkrts" 
  "--no-as-needed" "-lstdc++" "-lgcc" "-lgcc_s" 
  "-Bstatic" "-lirc" 
  "-Bdynamic" "-lpthread" 
  "-Bstatic" "-lsvml" 
  "-Bdynamic" "-lc" "-lgcc" "-lgcc_s" 
  "-Bstatic" "-lirc_s" 
  "-Bdynamic" "-ldl" "-lc" 
  "/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin/ofldend.o" 
  "/usr/lib/gcc/x86_64-redhat-linux/4.8.3/crtend.o" 
  "/usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crtn.o" 
  -mIPOPT_il_in_obj 
  -mIPOPT_ipo_activate_warn=FALSE 
  -mIPOPT_obj_output_file_name=/tmp/ipo_iccQaizwD.o 
  -mIPOPT_whole_archive_fixup_file_name=/tmp/iccwarchYPz29Y 
  -mGLOB_linker_version=2.23.2 
  -mGLOB_long_size_64 
  -mGLOB_routine_pointer_size_64 
  -mGLOB_driver_tempfile_name=/tmp/icctempfile0XAvZ3 
  -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS 
  -mGLOB_async_unwind_tables=TRUE 
  -mGLOB_obj_output_file=/tmp/ipo_iccQaizwD.o 
  -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_NONE 
  -mP1OPT_source_file_name=ipo_out.c 
  /tmp/iccDQNh0O.o 
  /tmp/iccffkzrc.o 
  -mIPOPT_object_files=T 
  -mIPOPT_assembly_files=/tmp/iccalisVWbmEM 
  -mIPOPT_generated_tempfiles=/tmp/iccelisidIfdR 
  -mIPOPT_embedded_object_base_name=/tmp/icceobjRTf9LV 
  -mIPOPT_cmdline_link_new_name=/tmp/iccllisbHP2k0
ld    /usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../lib64/crt1.o [...]


 

0 Kudos
Ravi_N_Intel
Employee
13,417 Views

Do you have /lib in the LD_LIBRARY_PATH or MIC_LD_LIBRARY_PATH if so remove it.

0 Kudos
Andrey_Vladimirov
New Contributor III
13,417 Views

Ravi Narayanaswamy (Intel) wrote:

Do you have /lib in the LD_LIBRARY_PATH or MIC_LD_LIBRARY_PATH if so remove it.

Ravi, thank you! There was /lib in LD_LIBRARY_PATH, and removing it solved the problem.

0 Kudos
Reply