patriciogonzalezvivo / ada_example3D

https://patriciogonzalezvivo.github.io/ada_example3D/
8 stars 0 forks source link

error when calling make. / Windows10 VS2022 #1

Open moebiussurfing opened 2 years ago

moebiussurfing commented 2 years ago
PS E:\ada\ada_example3d\build> cmake .. -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
CMake Warning:
  Ignoring extra path from command line:

   ".cmake"

-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044.
-- Including Win32 support
-- OPENGL_LIBRARIES: opengl32;glu32
-- OPENGL_opengl_LIBRARY:
CMake Deprecation Warning at deps/glew/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Could NOT find FFMPEG (missing: FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS)
-- LIBAV Supported
-- USING GLFW DRIVERS
-- PLATFORM WINDOWS
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: E:/ada/ada_example3d
PS E:\ada\ada_example3d\build> make
make: *** No targets specified and no makefile found.  Stop.
patriciogonzalezvivo commented 2 years ago

Hi! Seams you are trying to compile a WASM version for emscripten... have you install it before? Beside that seams you probably will be missing the ada submodule like in this other issue https://github.com/patriciogonzalezvivo/ada_example/issues/2

moebiussurfing commented 2 years ago

Yes, I did the emsdk installation steps before.

That's what I get:

PS E:\ada_example3D> dir

    Directory: E:\ada_example3D

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          10/06/2022    13:45                assets
d----          10/06/2022    13:45                deps
d----          10/06/2022    13:45                src
-a---          10/06/2022    13:45            755 .gitignore
-a---          10/06/2022    13:45             94 .gitmodules
-a---          10/06/2022    13:45           1972 CMakeLists.txt
-a---          10/06/2022    13:45         117691 earth-water.png
-a---          10/06/2022    13:45           7452 fullscreen.html
-a---          10/06/2022    13:45         117691 hello_3d_world.data
-a---          10/06/2022    13:45         103809 hello_3d_world.html
-a---          10/06/2022    13:45         384083 hello_3d_world.js
-a---          10/06/2022    13:45        1413848 hello_3d_world.wasm
-a---          10/06/2022    13:45          15972 index.html
-a---          10/06/2022    13:45           3065 README.md
-a---          10/06/2022    13:45         107126 thumbnail.png

PS E:\ada_example3D> git clone https://github.com/emscripten-core/emsdk.git
Cloning into 'emsdk'...
remote: Enumerating objects: 3316, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 3316 (delta 16), reused 19 (delta 8), pack-reused 3281
Receiving objects: 100% (3316/3316), 1.91 MiB | 6.36 MiB/s, done.
Resolving deltas: 100% (2160/2160), done.
PS E:\ada_example3D> cd emsdk
PS E:\ada_example3D\emsdk> git pull
Already up to date.
PS E:\ada_example3D\emsdk> ./emsdk install latest
Resolving SDK alias 'latest' to '3.1.13'
Resolving SDK version '3.1.13' to 'sdk-releases-upstream-bc44364b561cfde15c243a54e3b96ea12d7ea284-64bit'
Installing SDK 'sdk-releases-upstream-bc44364b561cfde15c243a54e3b96ea12d7ea284-64bit'..
Installing tool 'node-14.18.2-64bit'..
Downloading: E:/ada_example3D/emsdk/zips/node-v14.18.2-win-x64.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v14.18.2-win-x64.zip, 30570907 Bytes
Unpacking 'E:/ada_example3D/emsdk/zips/node-v14.18.2-win-x64.zip' to 'E:/ada_example3D/emsdk/node/14.18.2_64bit'
Done installing tool 'node-14.18.2-64bit'.
Installing tool 'python-3.9.2-nuget-64bit'..
Downloading: E:/ada_example3D/emsdk/zips/python-3.9.2-4-amd64+pywin32.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/python-3.9.2-4-amd64+pywin32.zip, 14413267 Bytes
Unpacking 'E:/ada_example3D/emsdk/zips/python-3.9.2-4-amd64+pywin32.zip' to 'E:/ada_example3D/emsdk/python/3.9.2-nuget_64bit'
Done installing tool 'python-3.9.2-nuget-64bit'.
Installing tool 'java-8.152-64bit'..
Downloading: E:/ada_example3D/emsdk/zips/portable_jre_8_update_152_64bit.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/portable_jre_8_update_152_64bit.zip, 69241499 Bytes
Unpacking 'E:/ada_example3D/emsdk/zips/portable_jre_8_update_152_64bit.zip' to 'E:/ada_example3D/emsdk/java/8.152_64bit'
Done installing tool 'java-8.152-64bit'.
Installing tool 'releases-upstream-bc44364b561cfde15c243a54e3b96ea12d7ea284-64bit'..
Downloading: E:/ada_example3D/emsdk/zips/bc44364b561cfde15c243a54e3b96ea12d7ea284-wasm-binaries.zip from https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/bc44364b561cfde15c243a54e3b96ea12d7ea284/wasm-binaries.zip, 428081990 Bytes
Unpacking 'E:/ada_example3D/emsdk/zips/bc44364b561cfde15c243a54e3b96ea12d7ea284-wasm-binaries.zip' to 'E:/ada_example3D/emsdk/upstream'
Done installing tool 'releases-upstream-bc44364b561cfde15c243a54e3b96ea12d7ea284-64bit'.
Done installing SDK 'sdk-releases-upstream-bc44364b561cfde15c243a54e3b96ea12d7ea284-64bit'.
PS E:\ada_example3D\emsdk> emsdk_env.bat
Setting environment variables:
PATH = E:\ada_example\emsdk;E:\ada_example\emsdk\upstream\emscripten;E:\ada_example\emsdk\node\14.18.2_64bit\bin;C:\Program Files\PowerShell\7;C:\Program Files\WindowsApps\Microsoft.PowerShell_7.2.4.0_x64__8wekyb3d8bbwe;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Python310\Scripts\;C:\Python310\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer;C:\ffmpeg\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile\;C:\Program Files (x86)\Common Files\Acronis\VirtualFile64\;C:\Program Files (x86)\Common Files\Acronis\FileProtector\;C:\Program Files (x86)\Common Files\Acronis\FileProtector64\;C:\Program Files\7-Zip\7z.exe;C:\Program Files\PuTTY\;C:\Program Files\PowerShell\7\;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\lib\make\tools\install\bin\make.exe;C:\msys64\mingw64\bin;C:\msys64\usr\bin;C:\Program Files\Git\cmd;C:\Users\moebi\scoop\shims;C:\Users\moebi\AppData\Local\Microsoft\WindowsApps;C:\Users\moebi\AppData\Local\GitHubDesktop\bin;C:\Users\moebi\.dotnet\tools;C:\Users\moebi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\moebi\AppData\Roaming\npm
Clearing existing environment variable: EMSDK_PY
PS E:\ada_example3D\emsdk> cd ..
PS E:\ada_example3D> dir

    Directory: E:\ada_example3D

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          10/06/2022    13:45                assets
d----          10/06/2022    13:45                deps
d----          11/06/2022     0:57                emsdk
d----          10/06/2022    13:45                src
-a---          10/06/2022    13:45            755 .gitignore
-a---          10/06/2022    13:45             94 .gitmodules
-a---          10/06/2022    13:45           1972 CMakeLists.txt
-a---          10/06/2022    13:45         117691 earth-water.png
-a---          10/06/2022    13:45           7452 fullscreen.html
-a---          10/06/2022    13:45         117691 hello_3d_world.data
-a---          10/06/2022    13:45         103809 hello_3d_world.html
-a---          10/06/2022    13:45         384083 hello_3d_world.js
-a---          10/06/2022    13:45        1413848 hello_3d_world.wasm
-a---          10/06/2022    13:45          15972 index.html
-a---          10/06/2022    13:45           3065 README.md
-a---          10/06/2022    13:45         107126 thumbnail.png

PS E:\ada_example3D> mkdir build

    Directory: E:\ada_example3D

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          11/06/2022     1:04                build

PS E:\ada_example3D> cd build
PS E:\ada_example3D\build> cmake .. -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
CMake Warning:
  Ignoring extra path from command line:

   ".cmake"

-- Building for: Visual Studio 17 2022
CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file:
  $EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
PS E:\ada_example3D\build>
moebiussurfing commented 2 years ago

sorry, I don't know if I forget to call "./emsdk activate latest" or not. I am very lost.

patriciogonzalezvivo commented 2 years ago

Morning. Couple of things:

  1. emsdk shouldn't be clone inside a project. you need it to be install on your system not in every project that use it.
  2. Beside installing and activating it, you need to add the path to it to your system... other wise ADA project (and any other project that requires it) will not know where to find it
  3. Seams you are using Windows. Just notice that I haven't provide documentation how to compile in windows. In theory should be similar to how glslViewer compiles on Windows. Windows don't have Makefiles apparently. Please follow thisbut with this repository address instadd of glslViewer one https://github.com/patriciogonzalezvivo/glslViewer/wiki/Compile-on-Windows
  4. Never worked with emscripten in windows, so I can't tell if there are particularities. Please refer to their documentation