Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

sys/stat.h missing

InvisibleWonder
5.144 Vistas

I'm building with dpcpp -std=c++17 and -fsycl, but I don't see stat.h anywhere in the oneapi.  I imagine frankenbuilding it from another glibc version will cause more problems than solve it.  I do however, see stat.h in one of the fpga's implementations...  why is it missing in the base API, then?

What is the best method of dealing with missing components of oneAPI's glibc? 

0 kudos
1 Solución
InvisibleWonder
5.034 Vistas

I prepared a minimal test case, but it compiled fine.  This narrowed down the search space enough to find the culprit:

link time optimization isn't supported (-flto).  Without it, the project is now linking properly with dpcpp.

 

Thank you for your Socratic help

Ver la solución en mensaje original publicado

5 Respuestas
NoorjahanSk_Intel
Moderador
5.122 Vistas

Hi Gabriel

 Thanks for reaching out to us.

  As you can see it here https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-dpcpp-system-requirements.html 

GNU is a software requirement for oneAPI.

   

   oneAPI takes glibc from GNU in linux to include C/C++ standard libraries in device code and having gcc is a mandate for using oneAPI for the same reason.

   

  In addition to this you can also find an extension where you can make use of glibc.

  Please refer: https://software.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/optimization-and-programming-guide/extensions/c-and-c-standard-libraries-support.html

 

Thanks & Regards

Noorjahan.

 

InvisibleWonder
5.097 Vistas

Thank you, Noorjahan, but on the devcloud environment, I cannot find libsysl-glibc.o.  Instead, I find:

  /opt/intel/inteloneapi/compiler/2021.2.0/linux/lib/libomp-glibc.o

But when I try to link with that or gcc's default glibc, dpgpp errors out, saying it's incompatible with -fsycl.

 

Finally, the supported functions in libsysl-glibc are very limited.  Obviously, device code cannot support all the functionality of glibc, but what is host code supposed to do?  How can legacy host code be preserved, while adding sycl functionality in specific offloads?

 

NoorjahanSk_Intel
Moderador
5.053 Vistas

Hi,


>>when I try to link with that or gcc's default glibc, dpcpp errors out, saying it's incompatible with -fsycl


Could you please provide a sample reproducer and steps you have followed. So that, we can work on it from our end.


Thanks & Regards

Noorjahan.

 


InvisibleWonder
5.035 Vistas

I prepared a minimal test case, but it compiled fine.  This narrowed down the search space enough to find the culprit:

link time optimization isn't supported (-flto).  Without it, the project is now linking properly with dpcpp.

 

Thank you for your Socratic help

NoorjahanSk_Intel
Moderador
5.019 Vistas

Hi,

Glad to know that your issue is resolved.

 

we will no longer respond to this thread.

If you require any additional assistance from Intel, please start a new thread.

Any further interaction in this thread will be considered community only.

 

Thanks & Regards

Noorjahan

 

Responder