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

Bug!!!make: *** No rule to make target `CarlaUE4Editor'. Stop. #103

Closed
yiakwy opened this issue Dec 21, 2017 · 8 comments
Closed

Bug!!!make: *** No rule to make target `CarlaUE4Editor'. Stop. #103

yiakwy opened this issue Dec 21, 2017 · 8 comments

Comments

@yiakwy
Copy link

yiakwy commented Dec 21, 2017

I am currently build it on MacOS and CentOS. Everything is good now after I tackled the dependency and Unreal app problems. But one last thing prevent me from proceeding:

Rebuld.sh ends with

running rule <build_linux> ...
[18/18] Linking CXX executable CarlaServer/test_carlaserver
[0/1] Install the project...
-- Install configuration: "Release"
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libboost_system.a
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libprotobuf.a
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla
-- Up-to-date: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/include/carla/carla_server.h
-- Installing: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libcarlaserver.a
-- Installing: /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/bin/test_carlaserver
<build_linux> successful!
Cleaning up CARLA Plugin...
Cleaning up CARLAUE4...
Generate Unreal project files...
GenerateLLDBInit.sh ...
GenerateProjectFiles.sh /Users/lei.wang1/Github/carla/Unreal/CarlaUE4/CarlaUE4.uproject

Setting up Unreal Engine 4 project files...

GenerateProjectFiles ERROR: It looks like youre missing some files that are required in order to generate projects.  Please check that youve downloaded and unpacked the engine source code, binaries, content and third-party dependencies before running this script.

I am sure my UE4 engine works well because I can create demo project and download Assets.

There is no Makefile in Unreal/CarlaUE4. And make will throw bugs below

$UE4Editor $PWD/CarlaUE4.uproject
# lack two .dylib files I think it might be compiled to .so so that MacOS users cannot use it
# then I proceed to Unreal/CarlaUE4 to try to modify Makefile
# but there is no Makefile and make simply throws an error
# make: *** No rule to make target `CarlaUE4Editor'.  Stop.

Where is the "makefile" in the folder?

@nsubiron
Copy link
Collaborator

Hi @yiakwy, "Rebuild.sh" is meant for Linux, we don't have support for MacOS or CentOS.

Compiling for MacOS is most probably possible, however you'll have to do some manual work. Please check the instruction to build Unreal Engine from source.

@yiakwy
Copy link
Author

yiakwy commented Dec 21, 2017

Hello@nsubiron, thanks for your reply. I did compiled Unreal Engine from source and I can run it from Xcode. I think that there should be a Makefile inside Unreal/Carla. I can generate xcode projects file, does it mean that I can build it inside xcode? I can specify Makefile dependency inside Xcode project.

(1) So the first question, could you show me what the Makefile for Unreal/Carla looks like? Which program generates it?

I got an error threw Source/Carla/SeceneCaptureCamera.cpp Line 27

static constexpr auto DEPTH_MAT_PATH =
#if PLATFORM_LINUX
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'");
#elif PLATFORM_WINDOWS
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'");
#else
#  error No depth material defined for this platform //Line 27
#endif

And another error from the same file, Line 30

static constexpr auto SEMANTIC_SEGMENTATION_MAT_PATH =
    TEXT("Material'/Carla/PostProcessingMaterials/GTMaterial.GTMaterial'");

xcode complains that "Expected expression" at the first token "static".

Could you give me any suggestion to tackle those problems?

Rebuild.sh shows no logics for Carla building.

@nsubiron
Copy link
Collaborator

Hi,

The Makefile is generated by Unreal Build Tool and it is specific for Linux, in Windows for instance it uses Visual Studio instead of Makefiles. In MacOS I think you build from Xcode, but I have never tried.

And regarding the error, we put it this way because the depth map shader is dependent on the graphics API and we have never tested it in MacOS. You can use one of the two and test, just replace those lines by

static constexpr auto DEPTH_MAT_PATH =
#if PLATFORM_LINUX
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial_GLSL.DepthEffectMaterial_GLSL'");
#else
    TEXT("Material'/Carla/PostProcessingMaterials/DepthEffectMaterial.DepthEffectMaterial'");
#endif

@yiakwy
Copy link
Author

yiakwy commented Dec 21, 2017

@nsubiron that works for the moment. And change the default clang c++ gramma to c++1z. Errors eliminated.

I didn't build [email protected] locally and use MacOS "brew" to install [email protected] followed by making soft links to clang at /usr/local/bin.

However, I checked brew formula that macOS [email protected] didn't ship libc++abi component hence I don't have libc++abi.a which stops compilation.

For example in my install_boost_locally_macos.sh (I will source it within Setup.sh), I have

pushd boost-source >/dev/null

LDFLAGS="-L/usr/local/opt/[email protected]/lib -Wl,-rpath,/usr/local/opt/[email protected]/lib"
CPPFLAGS="-I/usr/local/opt/[email protected]/include"
PY_SYS_PREFIX=$(python-config --exec-prefix)
PYFLAGS="-I${PY_SYS_PREFIX}/include/python3.6m"
LDPYLIB="-L${PY_SYS_PREFIX}/lib"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"

BOOST_TOOLSET="clang-3.9"
BOOST_CFLAGS="-fPIC -std=c++1z -stdlib=libc++ ${CPPFLAGS} ${PYFLAGS}"
BOOST_LFLAGS="-stdlib=libc++ ${LDFLAGS} ${LDPYLIB}"

./bootstrap.sh --with-toolset=clang --prefix=../boost-install
./b2 clean
./b2 toolset="${BOOST_TOOLSET}" cxxflags="${BOOST_CFLAGS}" linkflags="${BOOST_LFLAGS}" --prefix="../boost-install" -j 4 stage release
./b2 install toolset="${BOOST_TOOLSET}" cxxflags="${BOOST_CFLAGS}" linkflags="${BOOST_LFLAGS}" --prefix="../boost-install"

It works fine (I am boost users, and I am sure it works well with brew llvm). And I did the similar things for all other dependencies. They all are built locally and look good.

I have following libraries inside plugins

(Py3) ➜  CarlaUE4 git:(master) ✗ ls Plugins/Carla/CarlaServer/lib/
libboost_system.a libcarlaserver.a  libcarlaserverd.a libprotobuf.a

Now Xcode complains that

Showing Recent Issues
clang: error: no such file or directory: '/Users/lei.wang1/Github/carla/Unreal/CarlaUE4/Plugins/Carla/CarlaServer/lib/libc++abi.a'

Why libc++abi.a is needed? Is there any workarround

@nsubiron
Copy link
Collaborator

I'm not 100% sure that c++abi is needed, you can try removing it from the Carla plugin dependencies, and see if it compiles without link errors. Just remove the line 111 in the "Carla.Build.cs" file

PublicAdditionalLibraries.Add(Path.Combine(CarlaServerInstallPath, "lib", GetLibName("c++abi")));

This file sets up the all the dependencies of the Carla plugin and it's used by the Unreal Build Tool to generate and compile the project.

@yiakwy
Copy link
Author

yiakwy commented Dec 21, 2017

@nsubiron Build successfully! Even though the editor emit warning: "Mesh" are not found. My suggestion for building is that, we can build Unity separately then build Carla afterward. Hence argument "-engine" is not needed.

@nsubiron
Copy link
Collaborator

The "-engine" argument is there mostly because is the recommended way of building in the Unreal documentation for Linux. Since "make" makes sure only out-of-date files are recompile the engine builds only once. Plus it might come handy when you need to rebuild the engine sources; from time to time after some Linux upgrade you get this nasty error

fatal error: file '/usr/include/linux/version.h' has been modified since the precompiled header '..../SharedPCH.Engine.h.gch' was built

then you need to recompile also engine files, you can easily do it with

$ make CarlaUE4Editor ARGS=-clean
$ make CarlaUE4Editor

takes a lot of time but as far as I know it's necessary.

@yiakwy
Copy link
Author

yiakwy commented Dec 22, 2017

Get it! Thank you @nsubiron .

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

No branches or pull requests

2 participants