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

Can't find xxx.cpp #3

Closed
SirKnightTG opened this issue Oct 24, 2018 · 22 comments
Closed

Can't find xxx.cpp #3

SirKnightTG opened this issue Oct 24, 2018 · 22 comments

Comments

@SirKnightTG
Copy link

I just got my RTX 2080 Ti installed and I'm trying to run some ray tracing examples. I have Windows 10 1803 build 17134 and Visual Studio 2017 Pro completely up-to-date with the latest Windows SDK.

I cloned a fresh copy of the examples here, ran the update_dependencies.bat file inside the Falcor folder and then tried to build. I tried Debug and Release 64bit but I'm getting weird errors about the compiler not being able to find any of the example cpp files, yet they are there and I can open them.

I have attached the full log.

errors.txt

@erich666
Copy link
Contributor

erich666 commented Oct 24, 2018

It builds fine on my machine. I just tried downloading the whole thing again and trying from c:\temp, and it still builds fine.

First, do you have all the files? You should see the file, for example:

.\GettingStartedWithRTXRayTracing\SharedUtils\RenderingPipeline.cpp

Next, check if you can see this file RenderingPipeline.cpp in the first project, Tutor01-OpenWindow:

image

If you see it, can you right-click on RenderingPipeline.cpp and select "Compile" and have it build successfully?

Your path doesn't look long (sometimes a problem in Visual Studio), so I'm not sure what else it could be.

Let me know if you figure it out. I'm a bit stumped without being able to poke at it myself.

@SirKnightTG
Copy link
Author

I tried on two different machines. My notebook which has W10 1803 build 17134.345 and it fails to build:

1>------ Build started: Project: Tutor01-OpenWindow, Configuration: Debug x64 ------
1>RenderingPipeline.cpp
1>c1xx : fatal error C1083: Cannot open source file: '..\SharedUtils\RenderingPipeline.cpp': No such file or directory
1>Done building project "01-OpenWindow.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Then I tried on another desktop with W10 1709 build 16299.665 and it compiled fine!

I thought maybe it had to do with file permissions so I messed with that for a while but that didn't help. I can open the files just fine and see the code, but when building happens VS can't find it.

Very strange.

@erich666
Copy link
Contributor

Thanks very much for trying it on various machines - I'm glad one worked, but that's frustrating. I'll run the problem by others here and see if something turns up.

@SirKnightTG
Copy link
Author

I was looking through the project properties and noticed some env vars: FALCOR_DXR_DIR and FALCOR_DXR. Where do those get set?

@erich666
Copy link
Contributor

I'll check into the FALCOR settings - I've never had to think about them.

One coworker says about your compile problems, "Possibly some quirk with the version of VS the reporting user has installed? The user says they have the latest Win10 SDK, but the version they report isn’t the latest (and the user is on RS4)."

So make sure you do all the steps listed in the requirements section. I hope you do get things going - some of the demos are pretty fun to see working.

@SirKnightTG
Copy link
Author

SirKnightTG commented Oct 25, 2018

The version of VS 2017 Pro I have is 15.8.8. Which according to the Visual Studio Installer app, it's the latest.

Going into the individual components, the versions of the Windows SDK I have installed are:

  • 10.0.16299.0
  • 10.0.17134.0
  • 10.0.17763.0 (which is the newest the installer lists)

Yes I am on RS4 (which means I have to still use the experimental API for DXR) but that's because Microsoft pulled the RS5 update before I could install it. And until they do a lot of testing that it won't delete user's files, I'll be sticking with RS4. :)

@SirKnightTG
Copy link
Author

On the plus side, the vulkan examples here: "https://developer.nvidia.com/vkray-sample-code" compile and run just fine.

@erich666
Copy link
Contributor

I did try compiling the code on my home machine and found there was a bug in update_dependencies.bat, that it didn't properly install these dependencies. I've updated the "packman" utilities in GettingStartedWithRTXRayTracing\Falcor - please sync or download the zip for the repo and try running that again, just to be sure.

That said, I don't think this should help your problem; I didn't get your error on my home machine. But, it's worth a try, and I'm happy that at least one problem has been fixed for other people.

@chris-wyman
Copy link
Contributor

This is odd. The Falcor settings are largely set as part of the build step (there's some custom scripts that are run).

I've seen two other ways compiles get screwed up. For some reason, these samples have problems if there is a space in the directory structure it is installed into (which could potentially cause issues locating files during the compile). Another odd situation I've had is if the PatchFalcorPropertySheet.exe in Falcor/Framework/BuildScripts/ gets installed on your machine without executable permissions. (Happened to me with a Cygwin command-line git.)

We should be moving to RS5 soon with our samples, which will make most of the hair-pulling config issues go away...

@SirKnightTG
Copy link
Author

SirKnightTG commented Oct 25, 2018

I don't have any spaces and I use bash from Ubuntu on Windows for git. The PatchFalcorPropertySheet.exe seems to be marked for execute.

It's so strange that on two of my machines it can't compile any of the cpp files that are clearly there. Everything else I have compiles. I also checked the permissions and for Administrators and Users it has Full Control checked.

On the one machine that I can build with, I copied the Release folder with the exe's and data to my machine with the Turing in it and was able to run pretty much everything. But two examples crashed (DXR-SphereFlake and DXR-RayTracingInOneWeekend). I forget the exact message, but I think it was wanting me to call a function to find out exactly why there was an issue.

@erich666
Copy link
Contributor

I'm glad most of the programs worked. The DXR- programs are indeed a bit different, and it's too bad they died - they're the fun ones. I'll assume you have the latest drivers, etc. I myself will have an RTX 2080 Ti soon, so can try things out here. It would be good to figure out, for sure.

Like Chris says, RS5 may well fix a number of these problems, though I can't imagine it fixing your compile problems in any way. If you did want to screen-capture the crash message and paste it here, great. Thanks for all your help and quick responses - I wish we could be more helpful!

@SirKnightTG
Copy link
Author

I have the latest drivers according to GFE.

I also tried removing one of the cpp files from the project and adding it back in but it still chokes. This is definitely a strange one.

I'll attach a screen grab later today when I get home.

@chris-wyman
Copy link
Contributor

You can also grab my precompiled versions (or a slightly different code blob) from my website: http://intro-to-dxr.cwyman.org/ Sadly, that doesn't have Eric's fancy sphereflake demo. Not sure it will help, but this is a very odd bug, so who knows?

@nbentyNV
Copy link

Can you paste the content of Falcor\Framework\Source\Falcor.props ?

@SirKnightTG
Copy link
Author

Falcor.props:

$(SolutionDir)\Falcor\Framework\ FALCOR_DXR $(SolutionDir)Bin\$(PlatformShortName)\$(Configuration)\ $(SolutionDir)Bin\Int\$(PlatformShortName)\$(Configuration)\$(ProjectName)\ Level3 true $(FALCOR_CORE_DIRECTORY);$(FALCOR_CORE_DIRECTORY)\Source\;$(FALCOR_CORE_DIRECTORY)\Externals\nvapi;$(FALCOR_CORE_DIRECTORY)\Externals\GLM;$(FALCOR_CORE_DIRECTORY)\Externals\VulkanSDK\Include _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLM_FORCE_DEPTH_ZERO_TO_ONE;$(FALCOR_BACKEND);_UNICODE;UNICODE;%(PreprocessorDefinitions) $(FALCOR_CORE_DIRECTORY)\Externals\FreeImage;$(FALCOR_CORE_DIRECTORY)\Externals\Assimp\lib\$(PlatformName)\;$(FALCOR_CORE_DIRECTORY)\Externals\FFMpeg\lib\$(PlatformName);$(FALCOR_CORE_DIRECTORY)\Externals\openvr\lib\win64;$(FALCOR_CORE_DIRECTORY)\Externals\nvapi\amd64;$(FALCOR_CORE_DIRECTORY)\Externals\VulkanSDK\Lib;$(FALCOR_CORE_DIRECTORY)\Externals\Slang\bin\windows-x64\release;$(FALCOR_CORE_DIRECTORY)\Externals\GLFW\lib glfw3dll.lib;slang.lib;Comctl32.lib;Shlwapi.lib;assimp.lib;freeimage.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;avcodec.lib;avutil.lib;avformat.lib;swscale.lib;%(AdditionalDependencies) call $(FALCOR_CORE_DIRECTORY)\BuildScripts\postbuild.bat $(FALCOR_CORE_DIRECTORY)\ $(SolutionDir) $(ProjectDir) $(PlatformName) $(PlatformShortName) $(Configuration) $(OutDir) $(FALCOR_BACKEND) call $(FALCOR_CORE_DIRECTORY)\BuildScripts\prebuild.bat $(FALCOR_CORE_DIRECTORY) $(SolutionDir) $(ProjectDir) $(PlatformName) $(PlatformShortName) $(Configuration) $(OutDir) $(FALCOR_CORE_DIRECTORY) true

@nbentyNV
Copy link

nbentyNV commented Oct 25, 2018

That doesn't look like a valid property sheet file. It should be an XML file similar to this:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros">
    <FALCOR_CORE_DIRECTORY>$(SolutionDir)\.\Framework\FalcorSharedObjects\\..\</FALCOR_CORE_DIRECTORY>
    <FALCOR_BACKEND>FALCOR_D3D12</FALCOR_BACKEND>
  </PropertyGroup>
  <PropertyGroup>
    <OutDir>$(SolutionDir)Bin\$(PlatformShortName)\$(Configuration)\</OutDir>
    <IntDir>$(SolutionDir)Bin\Int\$(PlatformShortName)\$(Configuration)\$(ProjectName)\</IntDir>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <TreatWarningAsError>true</TreatWarningAsError>
      <AdditionalIncludeDirectories>$(FALCOR_CORE_DIRECTORY);$(FALCOR_CORE_DIRECTORY)\Source\;$(FALCOR_CORE_DIRECTORY)\Externals\nvapi;$(FALCOR_CORE_DIRECTORY)\Externals\GLM;$(FALCOR_CORE_DIRECTORY)\Externals\VulkanSDK\Include;$(FALCOR_CORE_DIRECTORY)\Externals\RapidJson\include;$(FALCOR_CORE_DIRECTORY)\Externals\pybind11\include;$(FALCOR_CORE_DIRECTORY)\Externals\Python\include;$(FALCOR_CORE_DIRECTORY)\Externals</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLM_FORCE_DEPTH_ZERO_TO_ONE;$(FALCOR_BACKEND);_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    </ClCompile>
    <Link>
      <AdditionalLibraryDirectories>$(FALCOR_CORE_DIRECTORY)\Externals\FreeImage;$(FALCOR_CORE_DIRECTORY)\Externals\Assimp\lib\$(PlatformName)\;$(FALCOR_CORE_DIRECTORY)\Externals\FFMpeg\lib\$(PlatformName);$(FALCOR_CORE_DIRECTORY)\Externals\openvr\lib\win64;$(FALCOR_CORE_DIRECTORY)\Externals\nvapi\amd64;$(FALCOR_CORE_DIRECTORY)\Externals\VulkanSDK\Lib;$(FALCOR_CORE_DIRECTORY)\Externals\Slang\bin\windows-x64\release;$(FALCOR_CORE_DIRECTORY)\Externals\GLFW\lib;$(FALCOR_CORE_DIRECTORY)\Externals\Python\libs</AdditionalLibraryDirectories>
      <AdditionalDependencies>glfw3dll.lib;slang.lib;Comctl32.lib;Shlwapi.lib;assimp.lib;freeimage.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;avcodec.lib;avutil.lib;avformat.lib;swscale.lib;Shcore.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
    <PostBuildEvent>
      <Command>call $(FALCOR_CORE_DIRECTORY)\BuildScripts\postbuild.bat $(FALCOR_CORE_DIRECTORY)\ $(SolutionDir) $(ProjectDir) $(PlatformName) $(PlatformShortName) $(Configuration) $(OutDir) $(FALCOR_BACKEND)</Command>
    </PostBuildEvent>
  </ItemDefinitionGroup>
  <ItemGroup>
    <BuildMacro Include="FALCOR_CORE_DIRECTORY">
      <Value>$(FALCOR_CORE_DIRECTORY)</Value>
      <EnvironmentVariable>true</EnvironmentVariable>
    </BuildMacro>
  </ItemGroup>
</Project>

@SirKnightTG
Copy link
Author

SirKnightTG commented Oct 25, 2018

The formatting got screwed up when I pasted it in. Let me try again.

@SirKnightTG
Copy link
Author

Falcor.zip

@nbentyNV
Copy link

nbentyNV commented Oct 25, 2018

Thanks.
It looks fine, PatchPropertySheet does its job.

The only thing I can suggest is to try to clone using GIT for windows from a regular windows command-prompt

@SirKnightTG
Copy link
Author

SirKnightTG commented Oct 25, 2018

IT WORKS! (with git for windows on the command prompt)

WTF is wrong with git on Ubuntu on Windows... I've never seen this happen before.

So on the machine I was able to compile previously, the version of Ubuntu on Windows was the older one where you had to go through a weird process at getting it installed. The other two machines is using the newer version you get from the Windows Store.

@erich666
Copy link
Contributor

Great! Glad this got figured out. So the advice is to clone from a regular Windows CMD window? That's some pretty weird advice, but I've added it.

To Software/Hardware Requirements:

  1. This code.
    • If you clone this repository using a command window, please use the standard Windows CMD window, not some Ubuntu shell, etc. For some reason an alternate shell can give the error "c1xx : fatal error C1083: Cannot open source file: '..\SharedUtils\FullscreenLaunch.cpp': No such file or directory" and similar when building the code.

To Troubleshooting:

Visual Studio gives "c1xx : fatal error C1083: Cannot open source file: '..\SharedUtils\FullscreenLaunch.cpp': No such file or directory" or similar when building. As noted in step 0, cloning the repository with Git under certain shells such as Ubuntu can cause problems with file paths. Use the Windows CMD command prompt, or download the zip.

Sound about right, @nbenty ?

erich666 pushed a commit that referenced this issue Oct 25, 2018
@halldorfannar
Copy link

halldorfannar commented Oct 26, 2018

One thing to note is that if you use Ubuntu git you will get LF line endings instead of CR + LF which is needed for Windows. I don't know if this caused the issue but this is often why mixing these operating systems in a build environment usually leads to heart ache.

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

5 participants