Skip to content

Build on Linux and UE 4.20 #648

Description

@BrunoXL

I'm trying to set up the plugin on Ubuntu 16 and on UE 4.20

I'm getting this error below:

	In file included from /home/bruno/rodain/src/ue_envorinment/Plugins/UnrealEnginePython/Source/PythonEditor/Private/PythonProject.cpp:4:
	In file included from /home/bruno/rodain/src/ue_envorinment/Plugins/UnrealEnginePython/Source/UnrealEnginePython/Public/UnrealEnginePython.h:22:
	In file included from /usr/include/python3.5/Python.h:8:
	/usr/include/python3.5/pyconfig.h:3:12: fatal error: 
	      'x86_64-linux-gnu/python3.5m/pyconfig.h' file not found
	#  include <x86_64-linux-gnu/python3.5m/pyconfig.h>
	           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	1 error generated.

Someone knows what is causing this issue?

Activity

  1. danRobot commented on Jan 17, 2019

    @danRobot

    U use UE 4 an python 3.6 and I have exactly the same problem.

    'x86_64-linux-gnu/python3.6m/pyconfig.h' file not found # include <x86_64-linux-gnu/python3.6m/pyconfig.h>

  2. mrpropellers commented on Jan 18, 2019

    @mrpropellers

    You may need to install the corresponding python3.x-dev package from apt-get.
    sudo apt-get install python3-5-dev or sudo apt-get install python3.5m-dev should install the missing headers for python3.5, same for 3.6 but with python3.6 and python3.6m. I don't remember whether you need the 'm' or not.

  3. danRobot commented on Jan 18, 2019

    @danRobot

    I forgot to mention that the package in my case is installed and the file pyconfig.h exist, i think that is a code generation like cmake bad config, but i can't link the file

  4. BrunoXL commented on Jan 18, 2019

    @BrunoXL
    Author

    @mrpropellers install python 3.5-dev doesn't work. Python3.5m-dev package does not exist.

    To me it's the same @danRobot. I do have pyconfig.h installed
    I'm wondering might it be related to clang version?

  5. mrpropellers commented on Jan 18, 2019

    @mrpropellers

    If the headers exist but they aren't being found on compile then it's likely '/usr/include' isn't in your include path for some reason. You might be able to get away with just adding the line
    PublicIncludePaths.Add("/usr/include");
    to the UnrealEnginePython.Build.cs file in Plugins/UnrealEnginePython/Source/UnrealEnginePython inside the else if (Target.Platform == UnrealTargetPlatform.Linux) conditional (around line ~250). This would be kind of a hack, but worth trying.

  6. danRobot commented on Jan 18, 2019

    @danRobot

    Thanks for the advice, it works for including pyconfig.h, but it produces a new error:

    /usr/include/locale.h:135:11: fatal error: 'bits/types/locale_t.h' file not found

    I tried to fix it, i install the necessary packages, so got another error:

    __locale_t.h:28:8: error: redefinition of '__locale_struct'

    and noticed that UE has their own libraries definitions. and got in conflict with the rest of files in /usr/include directory, there is a way to include only the file in question? just like PublicIncludePaths.Add("/usr/include/x86_64-linux-gnu/python3.6m/pyconfig.h");(its doesn't work)

  7. rozgo commented on Jan 19, 2019

    @rozgo

    A quick hack to unblock yourself:
    Symbolic link (in my case /usr/include/x86_64-linux-gnu/python3.6m) into ModuleDirectory (Plugins/UnrealEnginePython/Source/UnrealEnginePython/Include/x86_64-linux-gnu). You will end up with something like this:

    $ ls -lR
    .:
    x86_64-linux-gnu
    ./x86_64-linux-gnu:
    python3.6m -> /usr/include/x86_64-linux-gnu/python3.6m
    

    Then add this path, so pyconfig.h can be found.

    PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Include"));

    This should avoid adding /usr/include which will conflict with several internal UE4 includes.

  8. danRobot commented on Jan 21, 2019

    @danRobot

    Thanks, it works for me

  9. BrunoXL commented on Jan 22, 2019

    @BrunoXL
    Author

    @rozgo This worked for me
    Closing the issue...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions