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*
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

sys/stat.h missing

InvisibleWonder
4,049 Views

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 Solution
InvisibleWonder
3,939 Views

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

View solution in original post

0 Kudos
5 Replies
NoorjahanSk_Intel
Moderator
4,027 Views

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.

 

0 Kudos
InvisibleWonder
4,002 Views

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?

 

0 Kudos
NoorjahanSk_Intel
Moderator
3,958 Views

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.

 


0 Kudos
InvisibleWonder
3,940 Views

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

0 Kudos
NoorjahanSk_Intel
Moderator
3,924 Views

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

 

0 Kudos
Reply