Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line warning D9002 : ignoring unknown option '-fPIC' #91

Open
Gaelic98 opened this issue Oct 28, 2019 · 4 comments
Open

Command line warning D9002 : ignoring unknown option '-fPIC' #91

Gaelic98 opened this issue Oct 28, 2019 · 4 comments

Comments

@Gaelic98
Copy link

Hello All,

I've been attempting to install the code to perform some segmentation on some images we have as part of another project which uses pytorch and we hope to keep the code base consistent.

However, we are running into some issues with regards to installation.

Specifically we are struggling with the section:

 cd nms/src/cuda/
 nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
 cd ../../
 python build.py
 cd ../

 cd roialign/roi_align/src/cuda/
 nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
 cd ../../
 python build.py
 cd ../../

We have the correct arch and our cl.exe has been added to the file path. However, we encounter the errors:

nms_kernel.cu
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
nms_kernel.cu
cl : Command line warning D9002 : ignoring unknown option '-fPIC'
nms_kernel.cu
cl : Command line warning D9002 : ignoring unknown option '-fPIC'

when attempting to run:

F:\Code\pytorch-mask-rcnn\nms\src\cuda>nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=sm_61

We are using Windows 10 as our os with Visual Studio 2017.

Many Thanks in advance for any advice available.

@wangyifantech
Copy link

The -fPIC is the compile option of the gcc compiler. But the compiler you are using is cl.exe, since you are using the Visual Studio.

The cl.exe does not have the compile option -fPIC. So I think you need change the compiler to gcc, or find similar compile option of -fPIC (position-independent code) in cl.exe. But I think the best way is switching the environment to Linux.

If you can figure this out on Windows, please tell me, thank you.

Best,
Yifan

@Stephanie-ustc
Copy link

Have you solved this problem?

@Stephanie-ustc
Copy link

If you can figure this out on Windows, could you share this, thank you.

@oguzcanbekar
Copy link

Is there any development about this problem? Do I have to use Linux?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants