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

Linux/Macos port #31

Open
CedricGuillemet opened this issue Nov 25, 2018 · 36 comments
Open

Linux/Macos port #31

CedricGuillemet opened this issue Nov 25, 2018 · 36 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@CedricGuillemet
Copy link
Owner

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 CedricGuillemet added help wanted Extra attention is needed enhancement New feature or request labels Nov 25, 2018
@mattrei
Copy link

mattrei commented Feb 21, 2019

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

@CedricGuillemet
Copy link
Owner Author

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

@highway900
Copy link

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)

@CedricGuillemet
Copy link
Owner Author

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.

@highway900
Copy link

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.

@CedricGuillemet
Copy link
Owner Author

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

@highway900
Copy link

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
Copy link

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
Copy link

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?

@CedricGuillemet
Copy link
Owner Author

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

@axredneck
Copy link

axredneck commented Jun 1, 2019

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.

@highway900
Copy link

highway900 commented Jun 1, 2019 via email

@axredneck
Copy link

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

@CedricGuillemet
Copy link
Owner Author

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.

@axredneck
Copy link

@CedricGuillemet Arch Linux as before, GCC 8.3.0

@unfa
Copy link

unfa commented Jun 15, 2019

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
Copy link

unfa commented Jun 15, 2019

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
Copy link

unfa commented Jun 15, 2019

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

@CedricGuillemet
Copy link
Owner Author

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

@nafergo
Copy link

nafergo commented Jun 16, 2019

Any plans for appimage releases?

@axredneck
Copy link

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

@axredneck
Copy link

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.

@CedricGuillemet
Copy link
Owner Author

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

@axredneck
Copy link

Thank You, it works!

@axredneck
Copy link

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.

@leiserfg
Copy link

Try updating the submodules.

@axredneck
Copy link

axredneck commented Sep 28, 2019

Try updating the submodules

Already tried with no success.

@leiserfg
Copy link

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

@leiserfg
Copy link

The error I'm getting is because of this change in bgfx
bkaradzic/bgfx@855623e

@leiserfg
Copy link

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.

@CedricGuillemet
Copy link
Owner Author

I can't reproduce the issue with cmakegui + msvc :(

@leiserfg
Copy link

It happens if you update the submodules recursively cause they are making changes on bgfx, check

bkaradzic/bgfx@855623e

@leiserfg
Copy link

leiserfg commented Sep 28, 2019

Can be fixed just by replacing VertexDecl with VertexLayout.

@leiserfg
Copy link

leiserfg commented Sep 28, 2019

But then I started to get more bgfx errors, updating the submodules was a bad idea.

@CedricGuillemet
Copy link
Owner Author

I've pushed an update. let if know if it solves something

@axredneck
Copy link

I did git pull origin dev-0.14 and git submodule update, still the same issue:

CMake Error at ext/bgfx/cmake/3rdparty/glsl-optimizer.cmake:55 (list):
  list sub-command REMOVE_ITEM requires two or more arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants