Code Monkey home page Code Monkey logo

ue4-conan-recipes's Introduction

Conan recipes for UE4-compatible library packages

This repository contains Conan recipes for a variety of libraries to facilitate their use with Unreal Engine 4. The recipes make use of the infrastructure from conan-ue4cli to provide compatibility with UE4-bundled third-party libraries and avoid symbol interposition issues, as well as ensuring everything is built against the UE4-bundled version of libc++ under Linux.

To build the packages, you will need the following:

Starting from conan-ue4cli version 0.0.8, the recipes from this repository are automatically stored in the conan-ue4cli recipe cache and are available by default when building packages (unless the --no-cache flag is specified.)

To build all of the packages, run the following command (either from the root directory of this repository for conan-ue4cli version 0.0.7 and older, or any directory under newer versions of conan-ue4cli):

ue4 conan build all

(Note that if you attempt to run the above command from the root directory of this repository using newer versions of conan-ue4cli you will get a recipe conflict, since cloning this repository is no longer necessary unless you are contributing to the development of its recipes. Users should run the command from another directory as per the instructions above, whilst contributors should specify the --no-cache flag to ensure your modified recipes are used instead of the current upstream versions.)

Alternatively, you can specify a list of individual packages (with optional version numbers), like so:

ue4 conan build PACKAGE1 PACKAGE2==1.2.3 PACKAGE3

See the output of ue4 conan build --help for full usage details.

It is recommended that you build the packages from this repository inside the ue4-full Docker image from ue4-docker and then upload the built packages to a Conan remote so that they can be pulled from there for further use.

Legal

All of the recipe code and associated build infrastructure in this repository is licensed under the MIT License, see the file LICENSE for details. See the individual Conan recipes for the license details of the libraries that they build.

Development of the Python 3.6.8 recipe was funded by Deepdrive, Inc.

ue4-conan-recipes's People

Contributors

adamrehn avatar falcon4ever avatar slonopotamus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ue4-conan-recipes's Issues

Unreal build system has changed.

Just noticed that there seems to have been a settings change, at least in 4.24 (if not earlier)

Building <SomeUnrealProjectName>...
[Upgrade]
[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
[Upgrade]     bLegacyPublicIncludePaths = false                 => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
[Upgrade]     ShadowVariableWarningLevel = WarningLevel.Error   => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
[Upgrade]     PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs   => Set in build.cs files to enables IWYU-style PCH model. See https://docs.unrealengine.com/en-US/Programming/BuildTools/UnrealBuildTool/IWYU/index.html. (Previously: PCHUsageMode.UseSharedPCHs).
[Upgrade] Suppress this message by setting 'DefaultBuildSettings = BuildSettingsVersion.V2;' in <SomeUnrealProjectName>.Target.cs, and explicitly overriding settings that differ from the new defaults.
[Upgrade]

Switching to the new build settings version can also invalidate some of the current code, because PublicLibraryPaths is now obsolete (and PublicAdditionalLibraries wants the full path to a file). You end up with stuff like:

WARNING: Library '<someLibraryName>' was not resolvable to a file when used in Module 'SomeUnrealModuleName', assuming it is a filename and will search library paths for it. This is slow and dependency checking will not work for it. Please update reference to be fully qualified alternatively use PublicSystemLibraryPaths if you do intended to use this slow path to suppress this warning.

... Code sometimes still builds successfully, but is not guaranteed.

conflicting source directories detected for recipe

When I run ue4 conan build all I'm met with the following output:

raise RuntimeError('conflicting source directories detected for recipe {}'.format(conflict)) from None
RuntimeError: conflicting source directories detected for recipe MediaIPC-ue4

I'm sure my previous attempts caused this, as I tried using this before having the UE4 source tree configured properly. My question is, where do I look for these conflicting directories? Is some sort of cache generated / broken package installations that I need to clean up?

grpc-ue4 build is broken on Windows

While running ue4 conan build "grpc-ue4" throws an error "Could not find a package configuration file provided by "Protobuf""

Output:

...
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found c-ares: C:/Users/Redux Gamer/.conan/data/cares-ue4/1.16.1/adamrehn/4.27/package/7333dc905312a2df09e78e1a60d59e628a5f0321/lib/cmake/c-ares/c-ares-config.cmake (found suitable version "1.16.1", minimum required is "1.13.0")
CMake Error at cmake/protobuf.cmake:58 (find_package):
  Could not find a package configuration file provided by "Protobuf" with any
  of the following names:

    ProtobufConfig.cmake
    protobuf-config.cmake

  Add the installation prefix of "Protobuf" to CMAKE_PREFIX_PATH or set
  "Protobuf_DIR" to a directory containing one of the above files.  If
  "Protobuf" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  CMakeLists.txt:224 (include)


-- Configuring incomplete, errors occurred!
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeOutput.log".
See also "C:/.conan/9d531a/1/CMakeFiles/CMakeError.log".
grpc-ue4/1.30.2@adamrehn/4.27:
grpc-ue4/1.30.2@adamrehn/4.27: ERROR: Package 'bf9f4e336e64d98ce96ba6aaac093ac1ff3705d4' build failed
grpc-ue4/1.30.2@adamrehn/4.27: WARN: Build folder C:\.conan\9d531a\1
ERROR: grpc-ue4/1.30.2@adamrehn/4.27: Error in build() method, line 98
        cmake.configure(source_folder="grpc", args=self.cmake_flags())
        ConanException: Error 1 while executing cd C:\.conan\9d531a\1 && ...

I'm running Windows 10, UE4.27, python 3.7.8, cmake 3.21.3. I tried searching for the missing protobuf-config.cmake but it also can't be found in the conan or project folder.

Failing to build default recipes

When doing ue4 conan generate && ue4 conan build all, number of default recipes fail:

  • gdal
  • grpc-ue4

Notably the grpc-ue4 fails to build 15 targets with unresolved externals like these:

cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class google::protobuf::Descriptor const * __cdecl google::protobuf::MethodDescriptor::input_type(void)const " (__imp_?input_type@MethodDescriptor@protobuf@google@@QEBAPEBVDescriptor@23@XZ) referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl ProtoBufMethod::get_input_type_name(void)const " (?get_input_type_name@ProtoBufMethod@@UEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class google::protobuf::Descriptor const * __cdecl google::protobuf::MethodDescriptor::output_type(void)const " (__imp_?output_type@MethodDescriptor@protobuf@google@@QEBAPEBVDescriptor@23@XZ) referenced in function "public: virtual bool __cdecl ProtoBufMethod::get_module_and_message_path_output(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)const " (?get_module_and_message_path_output@ProtoBufMethod@@UEBA_NPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V23@_N1@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::MethodDescriptor::GetSourceLocation(struct google::protobuf::SourceLocation *)const " (__imp_?GetSourceLocation@MethodDescriptor@protobuf@google@@QEBA_NPEAUSourceLocation@23@@Z) referenced in function "void __cdecl grpc_generator::GetComment<class google::protobuf::MethodDescriptor>(class google::protobuf::MethodDescriptor const *,enum grpc_generator::CommentType,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *)" (??$GetComment@VMethodDescriptor@protobuf@google@@@grpc_generator@@YAXPEBVMethodDescriptor@protobuf@google@@W4CommentType@0@PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl google::protobuf::FileDescriptor::name(void)const " (__imp_?name@FileDescriptor@protobuf@google@@QEBAAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: virtual bool __cdecl CppGrpcGenerator::Generate(class google::protobuf::FileDescriptor const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class google::protobuf::compiler::GeneratorContext *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?Generate@CppGrpcGenerator@@UEBA_NPEBVFileDescriptor@protobuf@google@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVGeneratorContext@compiler@34@PEAV56@@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl google::protobuf::FileDescriptor::GetSourceLocation(class std::vector<int,class std::allocator<int> > const &,struct google::protobuf::SourceLocation *)const " (__imp_?GetSourceLocation@FileDescriptor@protobuf@google@@QEBA_NAEBV?$vector@HV?$allocator@H@std@@@std@@PEAUSourceLocation@23@@Z) referenced in function "void __cdecl grpc_generator::GetComment<class google::protobuf::FileDescriptor>(class google::protobuf::FileDescriptor const *,enum grpc_generator::CommentType,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *)" (??$GetComment@VFileDescriptor@protobuf@google@@@grpc_generator@@YAXPEBVFileDescriptor@protobuf@google@@W4CommentType@0@PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::io::Printer::Printer(class google::protobuf::io::ZeroCopyOutputStream *,char)" (__imp_??0Printer@io@protobuf@google@@QEAA@PEAVZeroCopyOutputStream@123@D@Z) referenced in function "public: virtual class std::unique_ptr<struct grpc_generator::Printer,struct std::default_delete<struct grpc_generator::Printer> > __cdecl ProtoBufFile::CreatePrinter(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?CreatePrinter@ProtoBufFile@@UEBA?AV?$unique_ptr@UPrinter@grpc_generator@@U?$default_delete@UPrinter@grpc_generator@@@std@@@std@@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl google::protobuf::io::Printer::~Printer(void)" (__imp_??1Printer@io@protobuf@google@@QEAA@XZ) referenced in function "public: virtual void * __cdecl ProtoBufPrinter::`scalar deleting destructor'(unsigned int)" (??_GProtoBufPrinter@@UEAAPEAXI@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::Printer::Print(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,char const *)" (__imp_?Print@Printer@io@protobuf@google@@QEAAXAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@PEBD@Z) referenced in function "public: virtual void __cdecl ProtoBufPrinter::Print(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,char const *)" (?Print@ProtoBufPrinter@@UEAAXAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@PEBD@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::Printer::Print(char const *)" (__imp_?Print@Printer@io@protobuf@google@@QEAAXPEBD@Z) referenced in function "public: virtual void __cdecl ProtoBufPrinter::Print(char const *)" (?Print@ProtoBufPrinter@@UEAAXPEBD@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::Printer::Indent(void)" (__imp_?Indent@Printer@io@protobuf@google@@QEAAXXZ) referenced in function "public: virtual void __cdecl ProtoBufPrinter::Indent(void)" (?Indent@ProtoBufPrinter@@UEAAXXZ) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::Printer::Outdent(void)" (__imp_?Outdent@Printer@io@protobuf@google@@QEAAXXZ) referenced in function "public: virtual void __cdecl ProtoBufPrinter::Outdent(void)" (?Outdent@ProtoBufPrinter@@UEAAXXZ) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl google::protobuf::io::Printer::PrintRaw(char const *)" (__imp_?PrintRaw@Printer@io@protobuf@google@@QEAAXPEBD@Z) referenced in function "public: virtual void __cdecl ProtoBufPrinter::PrintRaw(char const *)" (?PrintRaw@ProtoBufPrinter@@UEAAXPEBD@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl google::protobuf::compiler::PluginMain(int,char * * const,class google::protobuf::compiler::CodeGenerator const *)" (__imp_?PluginMain@compiler@protobuf@google@@YAHHQEAPEADPEBVCodeGenerator@123@@Z) referenced in function main [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
cpp_plugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static int const google::protobuf::FileDescriptorProto::kSyntaxFieldNumber" (__imp_?kSyntaxFieldNumber@FileDescriptorProto@protobuf@google@@2HB) referenced in function "void __cdecl grpc_generator::GetComment<class google::protobuf::FileDescriptor>(class google::protobuf::FileDescriptor const *,enum grpc_generator::CommentType,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *)" (??$GetComment@VFileDescriptor@protobuf@google@@@grpc_generator@@YAXPEBVFileDescriptor@protobuf@google@@W4CommentType@0@PEAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\Release\grpc_cpp_plugin.exe : fatal error LNK1120: 15 unresolved externals [C:\Users\iliak\.conan\data\grpc-ue4\1.16.0\adamrehn\4.24\build\2bf84d8fd36537e1aae88502d30749a85ac24423\grpc_cpp_plugin.vcxproj]
          

Even though the relevant lib produced by protobuf-ue4 and inluded for linking has those symbols in public section (verified by dumpbin /all)

D:\Tools\conan-ue4cli>ue4 version
Using user-specified engine root: c:\ue4
4.24.3

I have forcefully
set BinaryOutputDir=d:\tools\conan-ue4cli
to get past initial error.

running autoconf breaks libgdal build in Manjero Linux

testing in the source directory, running ./configure will successfully setup build that can then be made. running autoconf first creates an lot of complaints about obsolete macros and makes the project impossible to configure or build it would be better if the recipe did not do this step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.