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

Problem Compiling wit 4.15 on Linux ‘CLionSourceCodeAccess’ not found. #45

Open
Darkheron opened this Issue Feb 27, 2017 · 20 comments

Comments

Projects
None yet
6 participants
@Darkheron
Copy link

commented Feb 27, 2017

Are the instructions here: https://github.com/dotBunny/CLionSourceCodeAccess/wiki/Setup still valid? We upgraded to UE 4.15 and cannot get the plugin to compile on linux (Ubuntu 16.04 Mint 18.1).
Fails with the error “Plugin CLionSourceCodeAccess failed to load because ‘CLionSourceCodeAccess’ could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project”.
Might be doing something dumb, but the plugin worked very well on the same systems for UE 4.14 by following the setup instructions on the wiki.
I can post more details if needed.
Has this been confirmed by anyone to work on linux for 4.15?

EDIT: Some additional information. If we start a project as a C++ project and use the plugin, everything works perfectly, but when starting a blueprint project and attempting to use the plugin, an error "Missing or incompatible modules in CLionSourceCodeAccess plugin - would you like to disable it? You will no longer be able to open any assets created using it." dialog message appears. Choosing to disable the plugin at this point still causes an abort with the previously mentioned "failed to load" message.

Ordinarily we would just start a project as a C++ then add in blueprints later, but we are looking at doing some VR work and just used the VR blueprint project template to get started. We noted that by selecting a blueprint there was no Source directory under the project root, but the setup wiki seemed to indicate this was fine... quoting... "Along side your Source folder (if you have one), there may be a Plugins folder in your project root. ".

We have worked around this problem by going into the VR blueprint project, adding a dummy actor class, compiling the project, shutting down, adding the plugin code, then restarting. Now it is working fine. I do feel that either the setup wiki needs to be changed to reflect this idosyncrasy, or the outlining of some additional step to bring the build system in line to expect the plugin should be outlined.

Also, there is another problem that is kind of annoying but aesthetic. The clion generated makefile produces correct calls to the UnrealBuildTool, but names the targets as though the target system was Mac. For example:

add_custom_target(VRTest-Mac-Debug ${BUILD} && mono UnrealBuildTool.exe VRTest Linux Debug -project="/home/dh/Projects/Unreal/VRTest/VRTest.uproject" -game)

The invocation is correct, but it is labeled as VRTest-Mac-Debug when it should be VRTest-Linux-Debug.

Does this need a separate issue, do you want to take care of it from here, or is it too minor to even be logged as one?

@gotwig

This comment has been minimized.

Copy link

commented Apr 9, 2017

I have the same issue. 4.15.1 UE4 here, and I get :
"Plugin CLionSourceCodeAccess failed to load because module ClIonSourceCode Acces could not be found"

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented Apr 10, 2017

The latter problem regarding the naming of the target has been fixed in commit Add nicely named targets.

For the first problem I always find it useful to generate the project files prior to any project plugin. You can do that by running these commands:

cd path/to/UnrealEngine
./GenerateProjectFiles.sh -project="path/to/Project/Project.uproject" -game -engine

This should create the project files for you to run a C++ project. The step would hopefully replace the need to open the project and create a dummy actor class.

Maybe the plugin could detect that the project has not yet generated the needed files and to it automatically.

Hope it helps.

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2017

@RicardoEPRodrigues I think this is prolly something I can swing this week to add :)

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented Apr 10, 2017

When I have time I'll create a Nautilus plugin to Generate Project Files and push it to UE4. I hope that will solve some issues for newbies on Linux. 😄

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2017

Time is always the thing, at about 5pm today (a deadline) I start to have a little more free time and will likely add this first thing. Your solution is simple yet effective, I like it!

@weaponx69

This comment has been minimized.

Copy link

commented Apr 20, 2017

I am having similar issues trying to generate project files. I tried to use:
"/home/Documents/Unreal-Projects/SkyRunner_BP/ " -game -engine
to build my file but it says that my project is missing its source file. It is not missing the Source file. I also tried:
mono UnrealBuildTool.exe -codelitefile -project="/home/Documents/Unreal-Projects/SkyRunner_BP/ " -game -engine
but its saying:
UnrealBuildTool Exception: System.ArgumentException: File names may not be terminated by a path separator character
at UnrealBuildTool.FileReference..ctor (System.String InPath) <0x40a88ff0 + 0x000ab> in :0
at UnrealBuildTool.UnrealBuildTool.ParseRocketCommandlineArg (System.String InArg, System.String& OutGameName, UnrealBuildTool.FileReference& ProjectFile) <0x40a88960 + 0x003ab> in :0
at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs (System.String[] Arguments) <0x40a84b00 + 0x0025f> in :0
at UnrealBuildTool.UnrealBuildTool.Main (System.String[] Arguments) <0x409b7750 + 0x00037> in :0

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented Apr 20, 2017

@weaponx69 just to check, is your path correct?

Shouldn't "/home/Documents/" be something like "/home/username/Documents/"

@weaponx69

This comment has been minimized.

Copy link

commented Apr 20, 2017

Yes, I was missing that. I'm so tired. I been working on this for a while. For some reason, when you get a segmentation fault in linux, the editor will not run for a project. I was finally able to get my project editor to run again by erasing everything in my project folder except Source, uproject, and Contents and the editor finally appeared. The only problem is that it didn't rebuild the project folders which this fix allowed me to do. BTW, I can use CLion instead of Codelite? Codelite is not very light. Its very heavy and takes up a lot of memory.

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2017

So RECAP:

  • When using a non C++ project type Unreal does not look to compile plugins.

  • This is 95% of the problem cases we see where it doesn't show up

  • I have been playing around with how to trick Unreal to compile the plugin, without it being a C++ project (or having a C++ file in it) and havent been successful

  • a possible solution that I've prepared as a PR for UE is to always check and compile plugins (which makes sense right?)

  • I'd love to find a cleaner solution, say changing a definition in the uproject file, still investigating that.

  • Another solution (from answers): "For pure Blueprint project, just add empty C++ class from File menu. Then put plugin folder without Binaries file and next time when you load, it would recompile the plugin."

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2017

I love how at some point i thought "I can have the plugin generate the project to compile the plugin" ... infinite loop!

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2017

Another interesting idea : have old compiled versions of the plugin in the repo, so that UE forcibly rebuilds them when it loads and gives notice that they are out of date (this seems to be the less impactful way of doing it)

@reapazor

This comment has been minimized.

Copy link
Contributor

commented Apr 20, 2017

Makes me . sad that this is a problem from 2014
https://forum.allegorithmic.com/index.php?topic=3404.0

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented Apr 24, 2017

@reapazor I finally created a simple nautilus python extension for Generate Project Files of UE4. Could you please try it out and tell me what you think?

Requirements

For this to work you should have a mime type created for uprojects. The latest UE4 version already creates it in the Setup.sh file. If you are using older version download the attached file with the name uproject.xml and run the follow code:

mkdir -p ~/.local/share/mime/packages/
cp path/to/uproject.xml ~/.local/share/mime/packages/
update-mime-database ~/.local/share/mime

Remember to replace path/to/uproject.xml with the correct path.

Installation

  1. Download Attached file with name UnrealGenerateProjectExtension.py

  2. Place it under ~/.local/share/nautilus-python/extensions (some folders don't exist just create them)

  3. Open the file and change the path to your engine location. It should look like this:

    engineHome = '/path/to/UnrealEngine'
    """ change it to something like this """
    engineHome = '/home/username/UnrealEngine'

  4. Open a terminal and type nautilus -q (this will close all the nautilus windows, it is normal)

Usage

After installation all .uproject files when right clicked should show a new button of name Generate Project Files. Click it and watch it generate away.

Extension.zip

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented Apr 26, 2017

Pushed it to the master branch of UE. Let's see what happens.

EpicGames/UnrealEngine#3514

@RicardoEPRodrigues

This comment has been minimized.

Copy link

commented May 4, 2017

Back to topic, I find myself unable to compile the plugin.

I'm using cmake 3.8 and running Ubuntu 17.04.

I think the problem is that I'm using the master branch of UE4 and their might be problems with compatibility. IDK

Either way, I leave the log here for you to check and a short description of the error:

[1/4] Compile Module.CLionSourceCodeAccess.cpp
[2/4] Compile CLionSourceCodeAccess.generated.cpp
clang: error: no such file or directory: '/home/ricardo/Documents/UnrealProjects/DivisactionIntg/Plugins/CLionSourceCodeAccess/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/CLionSourceCodeAccess/Module.CLionSourceCodeAccess.cpp'
clang: error: no input files
<built-in>:1:10: fatal error: 
      '/home/ricardo/Documents/UnrealProjects/DivisactionIntg/Plugins/CLionSourceCodeAccess/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/CLionSourceCodeAccess/Definitions.CLionSourceCodeAccess.h'
      file not found
#include "/home/ricardo/Documents/UnrealProjects/DivisactionIntg/Plugins...
         ^
1 error generated.
ERROR: UBT ERROR: Failed to produce item: /home/ricardo/Documents/UnrealProjects/DivisactionIntg/Plugins/CLionSourceCodeAccess/Binaries/Linux/libUE4Editor-CLionSourceCodeAccess.so

log.txt

@gotwig

This comment has been minimized.

Copy link

commented May 18, 2017

Why is there no guide which tells me how to install this plugin system wide for ue4 on linux?! I tried everything, it doesnt work. this plugin doesnt work on linux as-is

@reapazor

This comment has been minimized.

Copy link
Contributor

commented May 18, 2017

Because its meant to be installed by project, havent gone into doing ue wide.

@gotwig

This comment has been minimized.

Copy link

commented May 18, 2017

ah ok... too bad you need to install another ide as well to even be able to create a c++ project, because if you dont, ue4 tells you that you got no compatible c++ editor installed.

@reapazor

This comment has been minimized.

Copy link
Contributor

commented May 18, 2017

Indeed, without creating a c++ project UE wont compile it ... thats something I'd like to see resolved at some point :) Im working through the process to get compiled versions free on the market place so that it gets passed that requirement

@Psiloscop

This comment has been minimized.

Copy link

commented Jan 19, 2018

I've solved the problem by compiling the plugin manually as described here https://www.youtube.com/watch?v=WtfLfYY_k2Y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.