Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.
This repository was archived by the owner on May 28, 2024. It is now read-only.

nvcc fatal : Unknown option 'fPIC' #73

Open

Description

@HangJie720

The following error is reported when compiling:
$make time_two_op
nvcc -std=c++11 -c -o tensorflow_time_two/python/ops/_time_two_ops.cu.o tensorflow_time_two/cc/kernels/time_two_kernels.cu.cc -I/usr/local/lib/python3.6/dist-packages/tensorflow_core/include -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -O2 -std=c++11 -L/usr/local/lib/python3.6/dist-packages/tensorflow_core -l:libtensorflow_framework.so.1 -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -DNDEBUG --expt-relaxed-constexpr nvcc fatal : Unknown option 'fPIC' Makefile:35: recipe for target 'tensorflow_time_two/python/ops/_time_two_ops.cu.o' failed make: *** [tensorflow_time_two/python/ops/_time_two_ops.cu.o] Error 1

Activity

  1. leimao commented on Sep 29, 2020

    @leimao
    Contributor

    This problem is also reproducible on my side.

    # make time_two_test
    2020-09-29 23:28:14.648088: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
    2020-09-29 23:28:16.572897: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
    nvcc -std=c++11 -c -o tensorflow_time_two/python/ops/_time_two_ops.cu.o tensorflow_time_two/cc/kernels/time_two_kernels.cu.cc  -I/usr/local/lib/python3.6/dist-packages/tensorflow/include -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -O2 -std=c++11 -L/usr/local/lib/python3.6/dist-packages/tensorflow -l:libtensorflow_framework.so.2 -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -DNDEBUG --expt-relaxed-constexpr
    nvcc fatal   : Unknown option 'fPIC'
    Makefile:35: recipe for target 'tensorflow_time_two/python/ops/_time_two_ops.cu.o' failed
    make: *** [tensorflow_time_two/python/ops/_time_two_ops.cu.o] Error 1
    
  2. fengxiaoshuai commented on Dec 17, 2020

    @fengxiaoshuai

    nvcc -Xcompiler -std=*** is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions