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

Fix headers for clang 6 build #417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aknarts
Copy link

@aknarts aknarts commented May 16, 2018

Fixes these issues during the build:

------- Build details --------
  Using clang (/usr/bin/clang++) version '6.0.0' (string), 6 (major), 0 (minor), 0 (patch)
  Using bundled libc++ standard C++ library.
  Using lld linker
  Using llvm-ar : /usr/bin/llvm-ar
  Using fast way to relink  circularly dependent libraries (no FixDeps).
  ------------------------------
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonConsole/Private/PyFbxFactory.cpp(1): error: Expected PyFbxFactory.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonConsole/Private/PythonConsoleModule.cpp(1): error: Expected PythonConsoleModule.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonConsole/Private/PythonScriptFactory.cpp(1): error: Expected PythonScriptFactory.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonConsole/Private/SPythonConsole.cpp(1): error: Expected SPythonConsole.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonConsole/Private/SPythonLog.cpp(1): error: Expected SPythonLog.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/DirectoryScanner.cpp(1): error: Expected DirectoryScanner.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PYRichTextSyntaxHighlighterTextLayoutMarshaller.cpp(1): error: Expected PYRichTextSyntaxHighlighterTextLayoutMarshaller.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonEditorCustomization.cpp(1): error: Expected PythonEditorCustomization.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonEditorStyle.cpp(1): error: Expected PythonEditorStyle.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProject.cpp(1): error: Expected PythonProject.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProjectEditor.cpp(1): error: Expected PythonProjectEditor.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProjectEditorCommands.cpp(1): error: Expected PythonProjectEditorCommands.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProjectEditorToolbar.cpp(1): error: Expected PythonProjectEditorToolbar.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProjectItem.cpp(1): error: Expected PythonProjectItem.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonSyntaxTokenizer.cpp(1): error: Expected PythonSyntaxTokenizer.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/SProjectViewItem.cpp(1): error: Expected SProjectViewItem.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/SPythonEditableText.cpp(1): error: Expected SPythonEditableText.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/SPythonEditor.cpp(1): error: Expected SPythonEditor.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/SPythonProjectEditor.cpp(1): error: Expected SPythonProjectEditor.h to be first header included.
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/PythonEditor/Private/WhiteSpaceTextRun.cpp(1): error: Expected WhiteSpaceTextRun.h to be first header included.
  ERROR: Build canceled.

@aknarts
Copy link
Author

aknarts commented May 16, 2018

Just a note this still fails with:

  ------- Build details --------
  Using clang (/usr/bin/clang++) version '6.0.0' (string), 6 (major), 0 (minor), 0 (patch)
  Using bundled libc++ standard C++ library.
  Using lld linker
  Using llvm-ar : /usr/bin/llvm-ar
  Using fast way to relink  circularly dependent libraries (no FixDeps).
  ------------------------------
  Performing 190 actions (8 in parallel)
  [1/190] Compile UEPyAudio.cpp
  [2/190] Compile UEPyCapture.cpp
  [3/190] Compile UEPyController.cpp
  [4/190] Compile UEPyDataTable.cpp
  [5/190] Compile UEPyExporter.cpp
  [6/190] Compile UEPyHUD.cpp
  [7/190] Compile UEPyInput.cpp
  [8/190] Compile UEPyLandscape.cpp
  [9/190] Compile UEPyMaterial.cpp
  [10/190] Compile UEPyMovements.cpp
  [11/190] Compile UEPyNavigation.cpp
  [12/190] Compile UEPyObject.cpp
  [13/190] Compile UEPyPackage.cpp
  [14/190] Compile UEPyPawn.cpp
  [15/190] Compile UEPyPhysics.cpp
  [16/190] Compile UEPyPlayer.cpp
  [17/190] Compile UEPySequencer.cpp
  [18/190] Compile UEPySkeletal.cpp
  [19/190] Compile UEPySpline.cpp
  [20/190] Compile UEPyAttaching.cpp
  [21/190] Compile UEPyStaticMesh.cpp
  [22/190] Compile UEPyAnimSequence.cpp
  [23/190] Compile UEPyFSlateApplication.cpp
  [24/190] Compile UEPySPythonEditorViewport.cpp
  [26/190] Compile UEPySPythonShelf.cpp
  [25/190] Compile UEPySPythonListView.cpp
  [27/190] Compile UEPySPythonTreeView.cpp
  [28/190] Compile UEPySPythonWidget.cpp
  [29/190] Compile UEPySRotatorInputBox.cpp
  [30/190] Compile UEPySScrollBox.cpp
  [31/190] Compile UEPySSlider.cpp
  [32/190] Compile UEPySSpacer.cpp
  [33/190] Compile UEPySSplitter.cpp
  [34/190] Compile UEPySTableViewBase.cpp
  [35/190] Compile UEPySTextBlock.cpp
  [36/190] Compile UEPySTreeView.cpp
  [37/190] Compile UEPySVectorInputBox.cpp
  [38/190] Compile UEPySVerticalBox.cpp
  [39/190] Compile UEPySViewport.cpp
  [40/190] Compile UEPySWidget.cpp
  [41/190] Compile UEPySWindow.cpp
  [42/190] Compile UEPySlate.cpp
  [43/190] Compile UEPyActor.cpp
  [44/190] Compile UEPySPythonComboBox.cpp
  [45/190] Compile UEPyTexture.cpp
  [46/190] Compile UEPyTransform.cpp
  [47/190] Compile UEPyFSoftSkinVertex.cpp
  [48/190] Compile UEPyFStringAssetReference.cpp
  [49/190] Compile UEPyFTransform.cpp
  [50/190] Compile UEPyFVector.cpp
  [51/190] Compile UEPyFViewportClient.cpp
  [52/190] Compile PyActor.gen.cpp
  [53/190] Compile PyCharacter.gen.cpp
  [54/190] Compile PyCommandlet.gen.cpp
  [55/190] Compile PyHUD.gen.cpp
  [56/190] Compile PyNativeWidgetHost.gen.cpp
  [57/190] Compile PyPawn.gen.cpp
  [58/190] Compile PyUserWidget.gen.cpp
  [59/190] Compile PythonBlueprintFunctionLibrary.gen.cpp
  [60/190] Compile PythonClass.gen.cpp
  [61/190] Compile PythonComponent.gen.cpp
  [62/190] Compile PythonDelegate.gen.cpp
  [63/190] Compile PythonFunction.gen.cpp
  [64/190] Compile PythonScript.gen.cpp
  [65/190] Compile UnrealEnginePython.init.gen.cpp
  [66/190] Compile UEPyFSocket.cpp
  [67/190] Compile UEPyTraceAndSweep.cpp
  [68/190] Compile UEPyFSlowTask.cpp
  [69/190] Compile UEPyFRawMesh.cpp
  [70/190] Compile UEPyUserDefinedStruct.cpp
  [71/190] Compile UEPyViewport.cpp
  [72/190] Compile UEPyWidget.cpp
  [73/190] Compile UEPyWidgetComponent.cpp
  [74/190] Compile UEPyWorld.cpp
  [75/190] Compile UEPyIVoiceCapture.cpp
  [76/190] Compile UEPyESlateEnums.cpp
  [77/190] Compile UEPyFARFilter.cpp
  [78/190] Compile UEPyFAssetData.cpp
  [79/190] Compile UEPyFColor.cpp
  [80/190] Compile UEPyFEditorViewportClient.cpp
  [81/190] Compile UEPyFHitResult.cpp
  [82/190] Compile UEPyFLinearColor.cpp
  [83/190] Compile UEPyFMorphTargetDelta.cpp
  [84/190] Compile UEPyFObjectThumbnail.cpp
  [85/190] Compile UEPyFPythonOutputDevice.cpp
  [86/190] Compile UEPyFQuat.cpp
  [87/190] Compile UEPyFRandomStream.cpp
  [88/190] Compile UEPyFRawAnimSequenceTrack.cpp
  [89/190] Compile UEPyFRotator.cpp
  [90/190] Compile UEPySProgressBar.cpp
  [91/190] Compile UEPySPythonMultiColumnTableRow.cpp
  [92/190] Compile UEPySOverlay.cpp
  [93/190] Compile UEPyUClassesImporter.cpp
  [94/190] Compile UEPyUScriptStruct.cpp
  [95/190] Compile UEPyUStructsImporter.cpp
  [96/190] Compile UEPyVisualLogger.cpp
  [97/190] Compile UnrealEnginePython.cpp
  [98/190] Compile UEPyEdGraph.cpp
  [99/190] Compile UEPyEdGraphPin.cpp
  [100/190] Compile UEPyICollectionManager.cpp
  [101/190] Compile UEPyIConsoleManager.cpp
  [102/190] Compile UEPyFbxIOSettings.cpp
  [103/190] Compile UEPyFbxImporter.cpp
  [104/190] Compile UEPyFbxManager.cpp
  [105/190] Compile UEPyFbxMesh.cpp
  [106/190] Compile UEPyFbxNode.cpp
  [107/190] Compile UEPyFbxObject.cpp
  [108/190] Compile UEPyFbxPose.cpp
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxIOSettings.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxIOSettings.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxImporter.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxImporter.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxManager.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxManager.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxMesh.cpp:2:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxMesh.h:7:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxNode.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxNode.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxObject.cpp:2:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxObject.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  [109/190] Compile UEPyFbxProperty.cpp
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxPose.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxPose.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  1 error generated.
  [110/190] Compile UEPySPanel.cpp
  1 error generated.
  [111/190] Compile UEPyIHttpBase.cpp
  1 error generated.
  [112/190] Compile UEPyTimer.cpp
  1 error generated.
  [113/190] Compile UEPyIHttpRequest.cpp
  1 error generated.
  [114/190] Compile UEPyTicker.cpp
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxProperty.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxProperty.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  1 error generated.
  [115/190] Compile UEPyModule.cpp
  1 error generated.
  [116/190] Compile PyActor.cpp
  [117/190] Compile PyCharacter.cpp
  [118/190] Compile PyCommandlet.cpp
  1 error generated.
  [119/190] Compile PyHUD.cpp
  [120/190] Compile PyNativeWidgetHost.cpp
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UEPyModule.cpp:45:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbx.h:7:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxManager.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  [121/190] Compile PyPawn.cpp
  [122/190] Compile PyUserWidget.cpp
  [123/190] Compile PythonBlueprintFunctionLibrary.cpp
  [124/190] Compile PythonComponent.cpp
  1 error generated.
  [125/190] Compile PythonDelegate.cpp
  [126/190] Compile PythonFunction.cpp
  [127/190] Compile PythonScript.cpp
  [128/190] Compile PythonSmartDelegate.cpp
  [129/190] Compile UEPyAssetUserData.cpp
  [130/190] Compile UEPyCallable.cpp
  [131/190] Compile UEPyEditor.cpp
  [132/190] Compile UEPyEngine.cpp
  [133/190] Compile UEPyEnumsImporter.cpp
  [134/190] Compile UEPyIPlugin.cpp
  [135/190] Compile UEPySubclassing.cpp
  [136/190] Compile UEPyIHttpResponse.cpp
  [137/190] Compile UEPyFbxScene.cpp
  [138/190] Compile UEPyFCharacterEvent.cpp
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxScene.cpp:1:
  In file included from /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/Fbx/UEPyFbxScene.h:6:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk.h:98:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxloadingstrategy.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxplugin.h:20:
  In file included from ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxobject.h:21:
  ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h:1188:70: error: binding dereferenced null pointer to reference has undefined behavior [-Werror,-Wnull-dereference]
                  return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);
                                                                                     ^~~~~~~~~~~~~~~~~~~
  [139/190] Compile UEPySDirectoryPicker.cpp
  [140/190] Compile UEPySDockTab.cpp
  [141/190] Compile UEPyFMaterialEditorUtilities.cpp
  [142/190] Compile UEPySEditableTextBox.cpp
  [143/190] Compile UEPySEditorViewport.cpp
  1 error generated.
  [144/190] Compile UEPySFilePathPicker.cpp
  [145/190] Compile UEPySGraphEditor.cpp
  [146/190] Compile UEPySGraphPanel.cpp
  [147/190] Compile UEPySGridPanel.cpp
  [148/190] Compile UEPySHeaderRow.cpp
  [149/190] Compile UEPySHorizontalBox.cpp
  [150/190] Compile UEPySImage.cpp
  [151/190] Compile UEPySLeafWidget.cpp
  [152/190] Compile UEPySLevelViewport.cpp
  [153/190] Compile UEPySListView.cpp
  [154/190] Compile UEPySMultiLineEditableText.cpp
  [155/190] Compile UEPySNodePanel.cpp
  [156/190] Compile UEPySNumericEntryBox.cpp
  [157/190] Compile UEPySObjectPropertyEntryBox.cpp
  [158/190] Compile UEPySCompoundWidget.cpp
  [159/190] Compile UEPySColorBlock.cpp
  [160/190] Compile UEPySDropTarget.cpp
  [161/190] Compile UEPySCanvas.cpp
  [162/190] Compile UEPyFGeometry.cpp
  [163/190] Compile UEPyFInputEvent.cpp
  [164/190] Compile UEPyFKeyEvent.cpp
  [165/190] Compile UEPyFMenuBuilder.cpp
  [166/190] Compile UEPyFModifierKeysState.cpp
  [167/190] Compile UEPySCheckBox.cpp
  [168/190] Compile UEPyFPointerEvent.cpp
  [169/190] Compile UEPyFSlateIcon.cpp
  [170/190] Compile UEPyFSlateStyleSet.cpp
  [171/190] Compile UEPyFPaintContext.cpp
  [172/190] Compile UEPyFTabSpawnerEntry.cpp
  [173/190] Compile UEPyFTabManager.cpp
  [174/190] Compile UEPySBoxPanel.cpp
  [175/190] Compile UEPySBox.cpp
  [176/190] Compile UEPySBorder.cpp
  [177/190] Compile UEPySButton.cpp
  [178/190] Compile UEPyIStructureDetailsView.cpp
  [179/190] Compile UEPyIDetailsView.cpp
  [180/190] Compile UEPyFToolBarBuilder.cpp
  [181/190] Compile UEPySAssetDropTarget.cpp
  [182/190] Compile Module.PythonEditor.gen.cpp
  [183/190] Compile Module.PythonAutomation.cpp
  [184/190] Compile Module.PythonConsole.cpp
  [185/190] Compile Module.PythonConsole.gen.cpp
  [186/190] Compile Module.PythonEditor.cpp
  ERROR: UBT ERROR: Failed to produce item: /home/user/temp/HostProject/Plugins/UnrealEnginePython/Binaries/Linux/libUE4Editor-UnrealEnginePython.so
  Total build time: 274.81 seconds (Local executor: 0.00 seconds)
Took 275.174322s to run mono, ExitCode=5

Looking into it, this is not this plugins issue but more of an engine not supporting clang 6 yet officially(Although it builds and compiles ok).

@rdeioris
Copy link
Contributor

Hi, the error is present in clang-3.9 too. I am investigating if i can bypass it

@aknarts
Copy link
Author

aknarts commented May 18, 2018

I found a way to bypass it but it requires modification of the fbxproperty.h which is not really desirable from the plugin standpoint.

Just for the posterity this works:(line 1188 in Engine/Source/ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h)

                return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(eFbxEnum), pValue, pForceSet, pFlags);
//              return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);

After this the errors move a bit further(working on it).

  [104/184] Compile UEPyFbxImporter.cpp
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:303:18: error: use of undeclared identifier 'IPlugin'
          for (TSharedRef<IPlugin>plugin : IPluginManager::Get().GetEnabledPlugins())
                          ^
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:303:26: error: unknown type name 'plugin'
          for (TSharedRef<IPlugin>plugin : IPluginManager::Get().GetEnabledPlugins())
                                  ^
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:303:33: error: expected unqualified-id
          for (TSharedRef<IPlugin>plugin : IPluginManager::Get().GetEnabledPlugins())
                                         ^
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:312:2: error: expected ';' in 'for' statement specifier
          if (ZipPath.IsEmpty())
          ^
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:312:2: error: expected expression
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:360:17: error: expected ')'
          Py_Initialize();
                         ^
  /home/user/temp/HostProject/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Private/UnrealEnginePython.cpp:303:6: note: to match this '('
          for (TSharedRef<IPlugin>plugin : IPluginManager::Get().GetEnabledPlugins())
              ^
  [105/184] Compile UEPyFbxManager.cpp
  6 errors generated.
  [106/184] Compile UEPyFbxMesh.cpp

I might just be building it wrong at this point

/home/user/fastrepos/UnrealEngine/Engine/Build/BatchFiles/RunUAT.sh -nop4 -verbose BuildPlugin -NoHostPlatform -TargetPlatforms=Linux -plugin=/home/user/repos/UnrealEnginePython/UnrealEnginePython.uplugin -Unversioned -package=/home/user/temp/

@mmmaat
Copy link
Contributor

mmmaat commented May 30, 2018

Hello, I experimented the same error with the FBX module when compiling with clang-3.9 on the new Ubuntu-18.04 (clang-3.8 is no more available on that distribution). The fix you propose @aknarts works pretty well. So modifying line 1188 in Engine/Source/ThirdParty/FBX/2018.1.1/include/fbxsdk/core/fbxproperty.h is sufficient:

return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(eFbxEnum), pValue, pForceSet, pFlags);
// return StaticInit(pObject, pName, FbxGetDataTypeFromEnum(FbxTypeOf(*((FbxReference*)0))), pValue, pForceSet, pFlags);

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants