- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
I noticed that icx v2024.1.0 for Windows can compile my source to create .obj file but it can not be linked due to LINK1248 error
i.e.
LINK : fatal error LNK1248: Image size (D761D000) exceeds maximum allowed size (80000000)
Then the same source was tried to be compiled in icx v2024.1.0for Linux, this time error message was as follows
/opt/intel/oneapi/compiler/2024.1/bin/compiler/../../lib/libirc.a(fast_mem_ops.c.o): in function `__cacheSize':
fast_mem_ops.c:(.text.__cacheSize+0x13): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text.__cacheSize+0x25): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
/opt/intel/oneapi/compiler/2024.1/bin/compiler/../../lib/libirc.a(fast_mem_ops.c.o): in function `__libirc_init_cache_tbl()':
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0xbd): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0xc5): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x14a): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x1d2): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x29c): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x612): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x619): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x620): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZL18__libirc_cache_tbl'
fast_mem_ops.c:(.text._ZL23__libirc_init_cache_tblv+0x626): additional relocation overflows omitted from the output
/opt/intel/oneapi/compiler/2024.1/bin/compiler/../../lib/libirc.a(fastmemset.c.o): in function `__intel_get_fast_memset_impl':
fastmemset.c:(.text.__intel_get_fast_memset_impl[__intel_get_fast_memset_impl]+0x4):
failed to convert GOTPCREL relocation against '__intel_cpu_feature_indicator_x'; relink with --no-relax
icx: error: linker command failed with exit code 1 (use -v to see invocation)
These are problems when I use icx to build my application. The very thing is Windows VIsual Studio 2019 CL.exe, LInux Gcc and Apple clang did all good job without such a error.
And moreover, Intel's ICC for mac ver 2021.3.0.20210609, which was installed in my Mac in 2021, did also good job without any error.
Unforntunately I could not check if it is OK in Windows ICL.exe which was installed in 2021 as a part of oneAPI tool kit v2022 since I deleted after the installation of oneAPI tool base kit v2024 and v2024.1.0 to my windows computer.
Anyway, I hope future version of oneAPI tool base kit icx compiler can produce linkable obj file clearing LINK1248 error.
With best regards,
Yuji Suda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
would you help try the following compiler command for this build error issue?
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=medium
#or
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=large
Here is the reference documentation:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @ysuda
In order to investigate your problem further, we need a reproducer and exact commands to reproduce the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex
Thank you for your reply.
Can I attach my c and h source files zipped to one file to this forum?
Yuji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, and please let us know the exact commands used to reproduce the issue. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex
Sorry being late to post a reproducer of icx link 1248 error.
It took a while to prepare a simplified reproducer. (attached zip file: for_intel_forum_icx_link_error.zip)
icx link error occurred during the development of my original console based server client system.
In the first stage to write basic communication loop of echo back server, there was NO PROBLEM.
This can be confirmed in the following build commands
Linux: /opt/intel/oneapi/compiler/2024.1/bin/icx -o srvVer_1_LinuxIcx server_ver_1_linux_icx.c
Windows: icx /Fe"servVer_1_WinIcx.exe" server_ver_1_win_icx.c ws2_32.lib
The server functionality can be tested with accompanying simple client c sources
in the another console.
Linux: icx -o clientLinuxGcc client_linux_gcc.c
Windows: icx /Fe"clinetWinCl.exe" client_win_cl.c
Then I advanced to implement a number of functionality to the server where I faced
icx link error.
The simplified reprocuders are
Linux: /opt/intel/oneapi/compiler/2024.1/bin/icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c
Windows: icx /Fe"servVer_2_WinIcx.exe" server_ver_2_win_icx.c ws2_32.lib
The server_ver_2 can be normally built with Linux gcc and Windows cl.exe.
Linux: gcc -o srvVer_2_LinuxGcc server_ver_2_linux_gcc.c
Windows: cl /Fe"servVer_2_WinCl.exe" server_ver_2_win_cl.c ws2_32.lib
The very difference between ver_1 and ver_2 is the size of global variables only,
otherwise they are identical.
I hope you and intel staff can cope with this link error in icx.
With best regards
Yuji Suda
ps. for_intel_forum_icx_link_error.zip contains the following sources
client_linux_gcc.c
client_linux_icx.c
client_win_cl.c
client_win_icx.c
server_ver_1_linux_gcc.c
server_ver_1_linux_icx.c
server_ver_1_win_cl.c
server_ver_1_win_icx.c
server_ver_2_linux_gcc.c
server_ver_2_linux_icx.c
server_ver_2_win_cl.c
server_ver_2_win_icx.c
OS_compiler_versionName.h
includeAndDefineWithoutSIMDandOmp.h
myTypeStructAndEnumeration.h <----- this is for server_ver_1
myTypeStructAndEnumerationAndGlobals.h <----- this is for server_ver_2
originalFunctionPrototype.h
tcpClient.h
tcpClientIncludeAndDefine.h
readme.txt
----------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ysuda Thanks, I can reproduce your problem. I've escalated this issue to our engineering team, and we'll work on it internally and update you when we reach a conclusion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex
Thank you for reconfirmation of icx link error issue and transfering the source to the technical department.
Here is a suggestion for finding a resolution. The server_ver_2_linux_ixc .c and ver_2_win_icx.c can be built with legacy icc and icl.exe, which were deprecated in the current oneAPI toolkit.
In Linux:
icc -o serv2IccGcc server_ver_2_linux_gcc.c
icc -o serv2IccIcx server_ver_2_linux_icx.c
They are all good in operation.
And
In Windows:
icl /Fe"serv2Icl.exe" server_ver_2_win_icx.c ws2_32.lib
This will be good in operation, although I can not see by myself, because I deleted oneAPI toolkit 2022 in which icl.exe is included when I updated to one API toolkit 2024.1. This latest version does not include icl.exe.
Yuji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
would you help try the following compiler command for this build error issue?
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=medium
#or
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=large
Here is the reference documentation:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joel_L_Intel
I tired both of them in linux icx 2024.1
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=medium
#or
icx -o srvVer_2_LinuxIcx server_ver_2_linux_icx.c -mcmodel=large
They completed compilation and link.
But when I executed srvVer_2_LinuxIcx, it showed error message as in the following.
error while loading shared libraries: libsvml.so: cannot open shared object file: No such file or directory
Yours,
Yuji
p.s. This -mcmodel option is not available in windows icx, too. Is there any way to solve link1248 error in windows icx?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
libsvml.so: cannot open shared object file , please refer to
Get Started with the Intel® oneAPI DPC++/C++ Compiler
Get Started on Linux* (intel.com) --> Before You Begin --> Set Environment Variables for CLI Development. You need to setup the correct runtime library path for libsvml.so.
Regarding link1248 error, it should be "Linker tools error LNK1248" from Microsoft linker. You are recommended to visit Microsoft website to check the suggestion - Linker Tools Error LNK1248 | Microsoft Learn. You are also recommended to move to 64-bit development environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joel_L_Intel
Thank you for the note on setting the path to icx compiler. It did work. Now icx for Linux is working good.
And as for link 1248 error issue in windows icx, I can not understand the reason why cl (visual studio 2019) does not produce link1248 error whereas icx( intel oneapi 2024.1) does produce link1248 error.
That is:
cl.exe /Fe"srvVer2_win_cl.exe" server_ver_2_win_cl.c ws2_32.lib ---> no problem
icx.exe /Fe"srvVer2_win_icx.exe" server_ver_2_win_icx.c ws2_32.lib ---> link1248 error
It seems to me that linker tools error LNK1248 in icx windows OS originates from icx itself. If icx for windows has a similar memory model option (small, medium and large), it should clear the problem. Are there any fundamental issue for unavailability of such compiler option in icx for windows?
Yuji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you add -v in the icx.exe compiling command? This should give more information about why you will see this LNK1248 error. It should point out the error was from MSFT's link.exe. Please also try /Gw, this will help reallocate the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joel_L_Intel
Thank you for your suggestion. I did compile with v option and the output file with link1248 error was attached in this reply. To my regret, I can hardly to analyse this output to find what is wrong in the compilation and linkage, except the executable image size is above the allowable maximum.
One more comment on this issue.
I could reinstall oneapi 2022 icx build 20211123 and legacy icl Version 2021.5.0 Build 20211109_000000
for windows OS
In this version of oneapi,
icl /Fe"srvV_2_icl.exe" server_ver_2_win_icx.c ws2_32.lib ----->no problem
and executable binary size is 233472 bytes.
icx /Fe"srvV_2_icl.exe" server_ver_2_win_icx.c ws2_32.lib ------>link 1248 error
Again, it seems to me that link1248 error orinates from icx itselft, because legacy icl could compile an executable image size within the allowalbe maximum.
Please reconsider this issue seen in icx for Windows OS.
Yuji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi Ysuda,
verbose log(-v) shows the progress of baking the codes into the final binary. if you review the tail of verbose log, you will find the last command triggers this LNK1248 error. however, the last error does not mean the root cause. In your case, you declare several large sized global data in a header file but did not actually use all of them.
can you try "icx /Gw /Fe"srvVer2_winIcx.exe" ws2_32.lib server_ver_2_win_icx.c"? This shall trigger linking optimization to exclude unused global data.
icl has been deprecated and discontinued.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Joel_L_Intel
Thanks a lot for reviewing the v option log and the very suggestion for clearing the current link1248 error.
/Gw option did work!
Now I can switch icx from icl.
Yuji

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page