Imogen icon indicating copy to clipboard operation
Imogen copied to clipboard

Linux/Macos port

Open CedricGuillemet opened this issue 5 years ago • 36 comments

Everything is coded with multiplatform in mind (mostly). And I compiled the project on a virtualized Ubuntu. It was a couple months ago and a Linux port (a solid one) would be great. Kudos if there is a possibility to produce binaries(packages) from a bot.

CedricGuillemet avatar Nov 25 '18 00:11 CedricGuillemet

yes please that would be great to have a guid for linux or even compiled binaries!

mattrei avatar Feb 21 '19 10:02 mattrei

I still have hope to find a contributor for the Mac/Linux port :)

CedricGuillemet avatar Feb 25 '19 01:02 CedricGuillemet

Amazing Project @CedricGuillemet I have just started playing with building in a ubuntu:18.04 docker container. Which version of Ubuntu did you use to compile against?

I would be happy to follow through with build bot if you can share some build specifics with me.

(note: I am not the greatest C++ person)

highway900 avatar Mar 30 '19 02:03 highway900

Hi Thank you for putting some time in the project :) I tried with a Centos 7 virtual machine (a long time ago). Most of the effort I put was in the cmake file. It needs a couple packages: libSDL-dev, opengl,... Since that test I may have added some non cross platform. Let me know if that happens, I'll fix that quickly.

CedricGuillemet avatar Mar 30 '19 03:03 CedricGuillemet

So I am back. I have setup a build pipeline using azure pipeline. This is pretty fast and free for open source applications. It also supports Windows, OSX and Linux which is nice, cos no one really support OSX.

https://dev.azure.com/highway900/Imogen/_build/results?buildId=4

That is the build result with a fairly vanilla cut of master. The only change is setting the C++ standard to 17. This fixed numerous build errors like using auto.

The current errors can be fixed by including math.h but I assume that this is done some other way with VS? This is pretty interesting to me, cpp build systems are not my strong suite.

I can invite you to the azure project, or you could start one for the project. I just thought it might be an easy way to run the builds and create some release/build artifacts for many platforms automatically.

Cheers.

highway900 avatar Apr 10 '19 07:04 highway900

That looks nice! Is there a way to not create a repo on azure but use github instead?

CedricGuillemet avatar Apr 11 '19 03:04 CedricGuillemet

The azure build system just points at my github fork of Imogen :) So there is no azure repository that I know of. I did allow access to azure to my fork. You can also manage the configuration yml file from inside the github repo.

highway900 avatar Apr 11 '19 03:04 highway900

As far as I can tell the version of pyconfig.h is generated by python configure system (or copied from PC/pyconfig.h) in the cpython source. The version included in imogen is for VS c++ or wacom compiler specifically. The file is ignored in the cpython source

I will try to compile with the linux python3.7-dev package instead.

highway900 avatar Apr 24 '19 22:04 highway900

Compiling with an installed version of python3.7 and package lookup in CMakeLists fixed the python dependency.

Now the compiler semantics are appearing. I get a different set of errors for GCC and Clang. I will focus on Clang at the moment in the hope that translates to OSX easier. Changing the C++ standard (11, 14, 17) also generates a variety of different errors. I am currently using 14 as 17 causes errors with pybind, which fits VS the best?

highway900 avatar Apr 28 '19 07:04 highway900

I don't know. I use vs2017 default settings. Focusing on Clang is a good idea.

CedricGuillemet avatar Apr 28 '19 19:04 CedricGuillemet

I just tried to build current "dev-0.14" branch and got this error: /home/redneck/programs/Imogen/src/EvaluationContext.cpp:26:10: fatal error: SDL.h: No such file or directory #include <SDL.h> though i have such file (/usr/include/SDL/SDL.h). Arch Linux.

axredneck avatar Jun 01 '19 18:06 axredneck

The path for SDL is likely incorrect in the include.

‘#include <SDL/SDL.h>’

This is actually where ‘SDL.h’ is. I would suggest changing the cmakelists file to search in the include subdirectory.

On Sun, 2 Jun 2019 at 04:34, axredneck [email protected] wrote:

I just tried to build current "dev-0.14" branch and got this error: /home/redneck/programs/Imogen/src/EvaluationContext.cpp:26:10: fatal error: SDL.h: No such file or directory #include <SDL.h> though i have this file (/usr/include/SDL/SDL.h). Arch Linux.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CedricGuillemet/Imogen/issues/31?email_source=notifications&email_token=AAIMTYGBIWIWDAXD3BG5GNTPYK6KVA5CNFSM4GGGTT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWXGFSY#issuecomment-497967819, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIMTYB2BFZ5WJ33IRTMT73PYK6KVANCNFSM4GGGTT4A .

highway900 avatar Jun 01 '19 23:06 highway900

Trying to compile dev-0.14 branch: /home/redneck/programs/Imogen/src/Platform.h:101:2: error: #error unknown platform #error unknown platform

axredneck avatar Jun 09 '19 13:06 axredneck

What's your compiler/OS? The platform.h sets the configuration and enables features based on the target. Currently, only Windows thru MSVC and emscripten are supported.

CedricGuillemet avatar Jun 09 '19 16:06 CedricGuillemet

@CedricGuillemet Arch Linux as before, GCC 8.3.0

axredneck avatar Jun 09 '19 19:06 axredneck

Hey! Are you looking for help with the Linux port?

I'm no developer but I could help with testing.

I'm a graphic designer and I'm really excited to see Imogen being a thing, as I want to make procedural PBR materials, but I don't want to become Adobe's servant for this. I used to use MapZone2 back in the day, before Allegorhytmic rebranded it into Substance Dsigner (I guess) and was bought by Adobe - it was awesome. I'm trying to make materials with Blender, but it's really difficult - getting a tiling noise texture is an endeavour on it's own, ad blurring the maps is actually only possible with a dirty and cmoputationally exansive hack. Also creating any geometric shapes requires modelling, so it's not trival to make a simple Diamond plate material.

I'd be really excited to help you develop the Linux port of Imogen (the web build doens't seem to work well for me).

I'm running Ryzen 7 1700 / GTX 1060 6GB / 32GB RAM and Manjaro Linux.

unfa avatar Jun 15 '19 21:06 unfa

I've truied building the newest git code on Linux, as well as the latest release. No success so far.

Building the latest release I get this error:

/data/Applications/Imogen-0.13.0/ext/python37/include/pyconfig.h:59:10: fatal error: io.h: No such file or directory
 #include <io.h>
          ^~~~~~
compilation terminated.

unfa avatar Jun 15 '19 22:06 unfa

Trying to compile dev-0.14 branch: /home/redneck/programs/Imogen/src/Platform.h:101:2: error: #error unknown platform #error unknown platform

I think I have the same issue: #68

unfa avatar Jun 15 '19 23:06 unfa

Yes, I broke the linux build with emscripten. Fixing it now.

CedricGuillemet avatar Jun 15 '19 23:06 CedricGuillemet

Any plans for appimage releases?

nafergo avatar Jun 16 '19 08:06 nafergo

@nafergo any plans for compile from sources first, the rest later.

axredneck avatar Jun 16 '19 15:06 axredneck

Now it compiles but crashes:

Imogen: /home/redneck/programs/Imogen/ext/imgui_draw.cpp:1623: ImFont* ImFontAtlas::AddFontFromFileTTF(const char*, float, const ImFontConfig*, const ImWchar*): Assertion `0' failed.

axredneck avatar Jul 11 '19 20:07 axredneck

It crashes because it doesn't find the font file. In your terminal run the app from the bin directory

CedricGuillemet avatar Jul 11 '19 20:07 CedricGuillemet

Thank You, it works!

axredneck avatar Jul 11 '19 20:07 axredneck

Doesn't compile again

CMake Error at ext/bgfx/cmake/3rdparty/glsl-optimizer.cmake:55 (list):
  list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
  ext/bgfx/cmake/tools/shaderc.cmake:14 (include)
  ext/bgfx/cmake/tools.cmake:17 (include)
  ext/bgfx/CMakeLists.txt:61 (include)

Arch Linux, Imogen dev-0.14 branch.

axredneck avatar Sep 28 '19 20:09 axredneck

Try updating the submodules.

leiserfg avatar Sep 28 '19 21:09 leiserfg

Try updating the submodules

Already tried with no success.

axredneck avatar Sep 28 '19 21:09 axredneck

Apparently, something is broken with bgfx, because I updated the submodules and now is failing for me also.

leiserfg avatar Sep 28 '19 21:09 leiserfg

The error I'm getting is because of this change in bgfx https://github.com/bkaradzic/bgfx/commit/855623e1534e9114847d8df3c2be52cb348e6493

leiserfg avatar Sep 28 '19 21:09 leiserfg

I'm not sure (I didn't read all the imogen code) but maybe will be healthier to use Vulkan directly, cause bgfx is doing api changes. You can use vukan on linux and windows and MolteVk or similar on macos.

leiserfg avatar Sep 28 '19 21:09 leiserfg