-
Notifications
You must be signed in to change notification settings - Fork 813
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
Window compilation issue. LNK1181 error #685
Comments
Note if I add Lib and indicate direct path (mujoco) like set LIB=C:\Users\X.mujoco\mujoco210\Lib;%LIB% I get a million unresolved LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored |
folks I complied by hand by can you tell me how I can overwrite -fopenmp In Extension Builder
class MujocoExtensionBuilder():
|
I added a pull request it fixes window compilation issues with the visual studio |
Describe the bug
A clear and concise description of what the bug is.
I think there is some issue when compiling under the window
I'm using the MSVC console.
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
LINK : fatal error LNK1181: cannot open input file 'mujoco210.lib'
error: command 'D:\dev\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe' failed with exit code 1181
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Open VC Console.
conda activate env_name
set MUJOCO_PY_MUJOCO_PATH=C:\Users\X.mujoco\mujoco210
set PATH=C:\Users\X.mujoco\mujoco210;%PATH%
clone repo
python setup.py build
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
LINK : fatal error LNK1181: cannot open input file 'mujoco210.lib'
error: command 'D:\dev\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe' failed with exit code 1181
Error Messages
Including more/longer error messages gives us more information to work with.
(X) c:\mujoco-py>python setup.py build
running build
Removing old mujoco_py cext c:\mujoco-py\mujoco_py\generated\cymj_2.1.2.14_38_windowsextensionbuilder_38.so
running build_ext
building 'mujoco_py.cymj' extension
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
dummyshim.c
cl : Command line warning D9025 : overriding '/W3' with '/w'
cl : Command line warning D9002 : ignoring unknown option '-fopenmp'
cymj.c
C:\Users\X\anaconda3\envs\X\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
LINK : fatal error LNK1181: cannot open input file 'mujoco210.lib'
error: command 'D:\dev\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe' failed with exit code 1181
Desktop (please complete the following information):
Environment
echo $LD_LIBRARY_PATH
echo $HOME
echo $USER
VC related
VCIDEInstallDir=D:\dev\Common7\IDE\VC
VCINSTALLDIR=D:\dev\VC
VCToolsInstallDir=D:\dev\VC\Tools\MSVC\14.29.30133
VCToolsRedistDir=D:\dev\VC\Redist\MSVC\14.29.30133
VCToolsVersion=14.29.30133
VisualStudioVersion=16.0
VS160COMNTOOLS=D:\dev\Common7\Tools
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x86
VSCMD_VER=16.11.10
VSINSTALLDIR=D:\dev\
Path=C:\Users\X.mujoco\mujoco210;
MUJOCO_PY_MUJOCO_PATH=C:\Users\X.mujoco\mujoco210
Conda and the rest
CommandPromptType=Native
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=X
ComSpec=C:\WINDOWS\system32\cmd.exe
CONDA_DEFAULT_ENV=X
CONDA_EXE=C:\Users\X\anaconda3\Scripts\conda.exe
CONDA_PREFIX=C:\Users\X\anaconda3\envs\X
CONDA_PROMPT_MODIFIER=(X)
CONDA_PYTHON_EXE=C:\Users\X\anaconda3\python.exe
CONDA_SHLVL=1
Additional context
Add any other context about the problem here.
I think somewhere the path to the lib file doesn't resolve correctly or maybe something different.
LINK : warning LNK4044: unrecognized option '/fopenmp'; ignored
LINK : fatal error LNK1181: cannot open input file 'mujoco210.lib'
error: command 'D:\dev\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe' failed with exit code 1181
First I think for VC it must /openmp
https://docs.microsoft.com/en-us/cpp/build/reference/openmp-enable-openmp-2-0-support?view=msvc-170
But it was ignored anyway.
So the root cause
LINK: fatal error LNK1181: cannot open input file 'mujoco210.lib'
The text was updated successfully, but these errors were encountered: