tobspr / LUI

Lightweight User Interface for Panda3D
MIT License
83 stars 26 forks source link

Building gives me an error #11

Closed Gamesaw-Drew closed 7 years ago

Gamesaw-Drew commented 8 years ago

When ever I build. it does a decent amount, but then gives me this: Illegal option: -n

My whole logs:


 build.py
Creating directory F:\LUI-master\scripts\..\win_i386_py27
Executing command:  cmake F:/LUI-master -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON_EXECUTABLE:STRING=C:\panda1.10\python\python.exe -DPROJECT_NAME:STRING=lui -DINTERROGATE_LIB:STRING=libp3interrogatedb -GVisual Studio 10 2010 -DPYTHONVER
:STRING=27 -DUSE_LIB_FREETYPE=TRUE -DUSE_LIB_EIGEN=TRUE -DIGATE_VERBOSE=0 -DOPTIMIZE=3

Process error:
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler using: Visual Studio 10 2010
-- Check for working C compiler using: Visual Studio 10 2010 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10 2010
-- Check for working CXX compiler using: Visual Studio 10 2010 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:219 (message):
  Interrogate failed: Executing command: C:\panda1.10\bin\interrogate -fnames
  -string -refcount -assert -python-native -SC:\panda1.10\include/parser-inc
  -SC:\panda1.10\include/ -srcdir .  -oc interrogate_wrapper.cpp -od
  interrogate.in -module lui -library lui -nomangle -DINTERROGATE -DCPPPARSER
  -D__STDC__=1 -D__cplusplus=201103L -D__inline -D_X86_ -DWIN32_VC -DWIN32
  -D_WIN32 -D_MSC_VER=1600 -D"__declspec(param)=" -D__cdecl -D_near -D_far
  -D__near -D__far -D__stdcall .\config_lui.h .\luiAtlas.h
  .\luiAtlasDescriptor.h .\luiAtlasPacker.h .\luiAtlasPool.h
  .\luiBaseElement.h .\luiBaseLayout.h .\luiBounds.h .\luiChunkDescriptor.h
  .\luiColorable.h .\luiEventData.h .\luiExpression.h .\luiFontPool.h
  .\luiHorizontalLayout.h .\luiInputHandler.h .\luiIterators.h .\luiObject.h
  .\luiRect.h .\luiRegion.h .\luiRoot.h .\luiSprite.h .\luiText.h
  .\luiVertexChunk.h .\luiVertexData.h .\luiVertexPool.h
  .\luiVerticalLayout.h

  Process error:

  Illegal option: -n

  [!] FATAL ERROR: Subprocess returned no-zero statuscode!

-- Configuring incomplete, errors occurred!
See also "F:/LUI-master/win_i386_py27/CMakeFiles/CMakeOutput.log".

[!] FATAL ERROR: Subprocess returned no-zero statuscode!

F:\LUI-master>C:/panda1.10/python/python.exe build.py```
tobspr commented 8 years ago

Looks like an issue with your interrogate version, which version of Panda3D do you use? Most likely you will have to update your version

Gamesaw-Drew commented 8 years ago

I'm using Panda 1.10

Gamesaw-Drew commented 8 years ago

I updated to a dev build (which probably will be a problem cuz the game needs to be on the main panda 1.10 version) and I got this error when building

  "F:\LUI-master\win_i386_py27\ALL_BUILD.vcxproj" (default target) (1) ->
   "F:\LUI-master\win_i386_py27\lui.vcxproj" (default target) (3) ->
   (ClCompile target) ->
     c:\panda1.10dev2\include\freetypeFace.h(26): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory [F:\LUI-master\win_i386_py27\lui.vcxproj]
     c:\panda1.10dev2\include\freetypeFace.h(26): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory [F:\LUI-master\win_i386_py27\lui.vcxproj]
     c:\panda1.10dev2\include\freetypeFace.h(26): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory [F:\LUI-master\win_i386_py27\lui.vcxproj]
     ..\source\luiInputHandler.cxx(193): error C2668: 'std::to_wstring' : ambiguous call to overloaded function [F:\LUI-master\win_i386_py27\lui.vcxproj]
     ..\source\luiInputHandler.cxx(205): error C2668: 'std::to_wstring' : ambiguous call to overloaded function [F:\LUI-master\win_i386_py27\lui.vcxproj]
     ..\source\luiInputHandler.cxx(209): error C2668: 'std::to_wstring' : ambiguous call to overloaded function [F:\LUI-master\win_i386_py27\lui.vcxproj]
     c:\panda1.10dev2\include\freetypeFace.h(26): fatal error C1083: Cannot open include file: 'ft2build.h': No such file or directory [F:\LUI-master\win_i386_py27\lui.vcxproj]
48 Warning(s)
7 Error(s)

Time Elapsed 00:00:19.83 [!] FATAL ERROR: Subprocess returned no-zero statuscode! F:\LUI-master>

tobspr commented 8 years ago

You need to copy the thirdparty folder of panda3d into your panda3d sdk, it is missing the freetype library headers.

Gamesaw-Drew commented 8 years ago

I put the third party in the root directory of Panda. Do I have the right stuff / setup? I tried building and it still gave the same error https://gyazo.com/ae00387e4dd507f197797ee9dff2c8b7

tobspr commented 8 years ago

The location looks right. Did you install a development build, or did you compile Panda3D from source? If you compiled it from source, you will have to copy the thirdparty directory both to the source folder, and the built folder.

Gamesaw-Drew commented 8 years ago

Downloaded development build

Gamesaw-Drew commented 8 years ago

I did a file search of the missing file, it does exist(https://gyazo.com/ab995e91935e8e8d1f9dd8389856bcab)

Gamesaw-Drew commented 8 years ago

Found the problem. I was being an idiot and using windows cmd and not bash

michaeladams commented 8 years ago

@Gamesaw-Drew

I'm having the same issue, I've copied the thirdparty dir into my prebuilt version of Panda, but get the same 'ft2build.h': No such file or directory even though the file exists.

How did you go about fixing it? Did you use the 'new' bash with Windows 10, or something else?

michaeladams commented 8 years ago

Ok, dont worry about it, just hard coded the THIRDPARTY_DIR variable in CMakeLists.txt.
Eg: set(THIRDPARTY_DIR "D:/thirdparty/win-libs-vc10")

Now getting an error on lui-master\source\luiInputHandler.I(22): error C2668: 'std::to_wstring' : ambiguous call to overloaded function, but I think thats because I need to use something more recent then VS2010 Express...

Edit: Ok - just replaced the offending line with return wstring(L"mouse-") + std::to_wstring(static_cast<long long>(index)); and it complied correctly.

tobspr commented 8 years ago

I just made changes to the P3D-Module-Builder to correctly find the thirdparty directory. The directory is expected at either <built directory>/thirdparty or <built directory>/../thirdparty. There is also much more verbose output, which should make it easier to track down issues.

Could you rerun the build and see if it works now? I also comitted your fix, thanks for that!

(Keep in mind to run update_module_builder.py before so you get the changes)

michaeladams commented 8 years ago

Ahah. I've pulled your changes - the change to the thirdparty dir seems to work - but its incorrectly assuming my cmake version is 64 bit. It must have originally been tripping up on this, buit wasnt evident without those extra debug messages.

The extra debug messages give me:

Unable to find thirdparty directory! Expected it at:
D:\dev\Panda3D-1.10.0/thirdparty/win-libs-vc10-x64

Changing the code like this seems to work for me, however, not sure about 64 bit builds:

  # Determine bitness
  set(THIRDPARTY_SUFFIX "-x64")
  if(CMAKE_CL_32 STREQUAL "CMAKE_CL_32")
    set(THIRDPARTY_SUFFIX "")
  endif()

Or this seems to work strangly enough:

if(NOT CMAKE_CL_64)

The other if statements related to CMAKE_CL_32 also don't seem to run. So I'm not sure why it doesn't like that constant.

tobspr commented 8 years ago

I updated the module builder, could you try running it again? It should work now, seems CMAKE_CL_64 is '1' when compiling with 64 bit

michaeladams commented 8 years ago

Awesome - yep that all seems to work now - thanks for the help!