Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

sys/stat.h missing

InvisibleWonder
498 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
388 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

5 Replies
NoorjahanSk_Intel
Moderator
476 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... 

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-gui...

 

Thanks & Regards

Noorjahan.

 

InvisibleWonder
451 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?

 

NoorjahanSk_Intel
Moderator
407 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.

 


InvisibleWonder
389 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

NoorjahanSk_Intel
Moderator
373 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

 

Reply