warning off and add -fPIC flag