Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

xilib error spawn_errno_default

Raghu_J_
Beginner
504 Views

Hello,

I encounter a  problem while compiling from command line using the Intel 64 Visual Studio 2012 prompt (Windows 7 64 bit). I do see that lib.exe is in the path before I run make. I get the the following error during compilation:

xilib.exe  /verbose /nologo /OUT:lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib obj/Windows64_x86_64_61_INTEL1312190_Release/AIProperty.obj obj

xilib: executing 'lib'

xilib: error #10036: unable to run 'lib'

xilib: error spawn_errno_default: spawn('C:\PROGRA~2\Intel\COMPOS~1\bin\intel64\xilink.exe') failed, errno=0

../config/common/rules.mk:337: recipe for target `lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib' failed

make[1]: *** [lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib] Error 127

make[1]: Leaving directory `/cygdrive/c/Apps/Promise/Inversion/RaX'

../config/common/rules.mk:294: recipe for target `RaX' failed

make: *** [RaX] Error 2

Now knowing that xilib uses VS lib program I expected it to be picked up based on my path settings. When I run the above xilib line by itself at the prompt it runs fine.

Appreciate any inputs you may have.

 

Regards,

Raghu

0 Kudos
6 Replies
Shenghong_G_Intel
504 Views

Hello Raghu,

Looks like you are using the make from Cygwin? You may provide more information on what kind of make you are using, I saw something like "/cygwin/c/...", if you are building from command line using the Intel 64 Visual Studio 2012 prompt (as you mentioned), why will we see cygwin path?

Is it bug of the make you are using? (looks like it does not accept the path from windows?) You may try to create a simple test case and let me know how you get the 'make.exe' for windows. This looks more like an issue of unsupported 'make.exe'.

Thanks,

Shenghong

0 Kudos
Shenghong_G_Intel
504 Views

By the way, I tried with make.exe which is built by myself in MinGW, and it works for me to run a simple makefile. See below:

test.c:

void foo() {}

Makefile:

default:
    icl /nologo test.c -c
    xilib.exe /nologo test.obj

Run:

C:\Users\sgeng2\Desktop\share\make>make
icl /nologo test.c -c
test.c
xilib.exe /nologo test.obj
xilib: executing 'lib'

C:\Users\sgeng2\Desktop\share\make>make -version
GNU Make 4.0
Built for i686-pc-mingw32
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

C:\Users\sgeng2\Desktop\share\make>

Thanks,

Shenghong

 

0 Kudos
Raghu_J_
Beginner
504 Views

Thank you for looking into the issue Shenghong. However, the issue does not seem to be related to Make. I had tested a dummy case

.PHONY: all install clean

all: test.exe

test.obj: test.cpp
    icl /nologo /c test.cpp

test.lib:test.obj
    xilib /nologo /OUT:lib/test.lib test.obj
clean:
    rm test.obj lib/test.lib

with the following make version

GNU Make 3.82.90

Built for x86_64-unknown-cygwin

and it compiled fine. 

 

The issue I am having seems more to be related to something in my makefile (which unfortunately I cannot share due to company policy). The xilib/xilink -lib seems to run fine by itself or in a dummy case above but when I run the make for my project (that I am porting from linux to windows), I encounter this issue (pasted again below)

 

xilink -lib /verbose /MACHINE:X64  /OUT:lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib  obj/Windows64_x86_64_61_INTEL1312190_Release/AIProperty.obj obj/Windows64_x86_64_61_INTEL1312190_Release/CellProperty.obj
xilib: executing 'lib'
xilib: error #10036: unable to run 'lib'
../config/common/rules.mk:341: recipe for target `lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib' failed
make[1]: *** [lib/Windows64_x86_64_61_INTEL1312190_Release/RaX.lib] Error 127
make[1]: Leaving directory `/cygdrive/c/Apps/Promise/Inversion/RaX'
../config/common/rules.mk:294: recipe for target `RaX' failed
make: *** [RaX] Error 2

 

I know it is hard without actually being able to look at the makefile, but would appreciate any pointers.

 

~Raghu

0 Kudos
Shenghong_G_Intel
504 Views

Hi Raghu,

I need to confirm again that are you running the 'make' from VS command line prompt, or Cygwin terminal, I am confused to see the messages like "make[1]: Leaving directory `/cygdrive/c/Apps/Promise/Inversion/RaX'". If you are using Cygwin, ICC may not support it.

It is really difficult to investigate because you said it works with a dummy test case. :(

Whatever, I'd still suggest you to try with the make.exe I send to you, just hope it may be lucky.

 

 

Another possible approach is, you may try debugging. I just create a lib.bat in the folder of where Makefile is, and write as below:

@echo OFF
echo %*
pause

I can see my own lib.bat will be invoked and I can see the actual argument it passed (the arg is a file name, which contains the actual arguments). Then, I run "lib.exe <the file name>" and I can see it works. You may check like this to see whether there are any issues in the generated arguments passed from xilib/xilink. Hope you can find some clues from this. If not, you may need to try to generate a test case from your big project.

Hope you will be lucky this time!

Thanks,

Shenghong

 

0 Kudos
Sukruth_H_Intel
Employee
504 Views

Hi Raghu,

                  If you want to use icl in cygwin window, Then you may need to do some small tweaking as mentioned in this article :- https://software.intel.com/en-us/articles/alias-method-for-using-intel-windows-compilers-under-cygwin-bash-shell 

I had used cygwin to compile the above testcase and was successful. You may have a try once by setting up the cygwin and then run your Makefile and do let us know if you facing the same issue.

This was my sample output :-

shv@SHV-MOBL2 /cygdrive/c/Users/shv/Desktop
$ pwd
/cygdrive/c/Users/shv/Desktop

shv@SHV-MOBL2 /cygdrive/c/Users/shv/Desktop
$ cat Makefile
all: test.lib

test.obj: test.c

        icl /nologo /c test.c

test.lib:test.obj

        xilib /nologo /OUT:lib/test.lib test.obj

clean:

        rm test.obj test.lib

shv@SHV-MOBL2 /cygdrive/c/Users/shv/Desktop
$ make clean
rm test.obj test.lib
rm: cannot remove `test.lib': No such file or directory
Makefile:13: recipe for target 'clean' failed       --> Usually if the recipe fails, then the reason would be mentioned in preceding statement. I did this purposefully to showcase the error.
make: *** [clean] Error 1

shv@SHV-MOBL2 /cygdrive/c/Users/shv/Desktop
$ make
icl /nologo /c test.c
test.c
xilib /nologo /OUT:lib/test.lib test.obj
xilib: executing 'lib'

Regards,

Sukruth H V

0 Kudos
Shenghong_G_Intel
504 Views

Hello Raghu,

is your issue resolved?

Thanks,

Shenghong

0 Kudos
Reply