- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have migrated the code and tried to generate target file using makefile.
$ make
dpcpp -shared -o libadd.so add.dp.o
/usr/bin/ld: /tmp/add-071358.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /tmp/libadd-ca2409.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
dpcpp: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:15: recipe for target 'libadd.so' failed
make: *** [libadd.so] Error 1
Please find the original Makefile attached along with source code files in the zip file attached!! I was able to generate target file in native code.
But I'm unable to do the same after migration. Can you please let me know the changes need to be done to makefile so that i can generate target file using dpcpp?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
We apologise for the unavailability of the attached screenshot, and there might be some technical issue.
Please find the steps below.
- dpcpp -fPIC -c add.dp.cpp
- dpcpp -fPIC -shared -o libadd.so add.dp.o
- mpiicc driver.c libadd.so -o myout
Also, I'm attaching the screenshot again. Please check it below.
Let us know if you face any further challenges.
Thanks & Regards
Goutham
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Use the -fPIC option when building shared libraries. It is required for the compilation of each object file included in the shared library.
Please follow the below steps to create a shared object file.
Let us know if you face any further issues.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steps are not mentioned in the previous reply.
Please find the screenshot !! and provide the necessary steps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
We apologise for the unavailability of the attached screenshot, and there might be some technical issue.
Please find the steps below.
- dpcpp -fPIC -c add.dp.cpp
- dpcpp -fPIC -shared -o libadd.so add.dp.o
- mpiicc driver.c libadd.so -o myout
Also, I'm attaching the screenshot again. Please check it below.
Let us know if you face any further challenges.
Thanks & Regards
Goutham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response!! It "helped'' me to resolve the issue.
Thanks & Regards
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Santosh,
Glad to know that your issue is resolved!
Thanks for the confirmation!
As this issue has been 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.
Have a Good day!
Thanks & Regards
Goutham
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page