all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Théo Maxime Tyburn" <theo.tyburn@gmail.com>
To: Ekaitz Zarraga <ekaitz@elenq.tech>
Cc: Maxime Devos <maximedevos@telenet.be>, guix-devel@gnu.org
Subject: Re: Blender export backend missing
Date: Thu, 26 May 2022 12:56:58 +0200	[thread overview]
Message-ID: <87zgj4lbva.fsf@gmail.com> (raw)
In-Reply-To: <sq2O_q6x4U4BGmptQYVnbOw6qnWD40s5IBl3_UMA0Jrj-MZy9gOniXnEHEcKIJGleEasWdOdx_Dl2ncj8oZY4TVL8NldAeinVBdwHcRHk0M=@elenq.tech>

Hello,

I tried several things in the last days. Unfortunatly I still didn’t
manage to build Blender with the new OpenEXR IMath version. Long story
short: I think upgrading blender to 3.1.0 will solve the problem. But
this requires to have python 3.10. So I’ll wait until we have it and
come back to it later.

In the meantime we can leave openexr to the old version and just add
an alternative alembic package that is based on it. I used this approach in the last few days to work
with alembic files in blender and it just works fine. I’ll propose a
patch for this. I never did this for guix though, so I might still have
some questions :)

Ekaitz Zarraga <ekaitz@elenq.tech> writes:
[...]
> I know this is a huge effort, I had to deal with similar things in
> Blender and Meshlab in the past, so I'm here to help!
>
> Good job,
> Ekaitz

Thank you for encouraging me! It is indeed a messy problem. Let’s see
how this works out with the newer version of python and blender.

Here is the story of my experimentations with gorry details:

The patch I mentioned in my previous message is actually for a much older version, so it can’t
even apply. There is a simple way to avoid the error occuring at config
time though: if you set "-DWITH_CYCLES=OFF" then the config succedes. So
it seems the problem comes from Cycles. This is a problem on its
own. Not sure what to do about it. It looks more like an upstream
problem.

Anyway, even with that problem put aside, there is another one. The package half is not found at
compile time. In earlier versions of OpenEXR it was part of IlmBase, now
it is in IMath. The trick for blender based on ilmbase was to add
(string-append (assoc-ref inputs "ilmbase") "/include/OpenEXR/")
to C_INCLUDE_PATH and CPLUS_INCLUDE_PATH so that half can be found.
So now that half is in IMath I changed it to
(string-append (assoc-ref inputs "imath") "/include/IMath/")
unfortunatly this didn’t work: half is still not found.

I am confused because I tried a small experiement with a simple c code
and it worked when setting C_INCLUDE_PATH. So this compiles:
--8<---------------cut here---------------start------------->8---
C_INCLUDE_PATH=/gnu/store/pxf5591fpradfjjqyx7j269xilwndcmk-imath-3.1.3/include/Imath/ gcc use-half.c
--8<---------------cut here---------------end--------------->8---
where use-half.c contains
--8<---------------cut here---------------start------------->8---
#include <half.h>

void main() {
  printf("hello");
}
--8<---------------cut here---------------end--------------->8---
So I’m not sure why this doesn’t work in the context of blender being
  built. Any idea?
  
By the way this seems to be something that should be set by the ilmbase and
imath packages, right? Or is it just a problem of blender not specifying
half is to be found in IMath. For example this compiles:
--8<---------------cut here---------------start------------->8---
gcc use-Imath-half.c
--8<---------------cut here---------------end--------------->8---
where use-Imath-half.c contains
--8<---------------cut here---------------start------------->8---
#include <Imath/half.h>

void main() {
  printf("hello");
}
--8<---------------cut here---------------end--------------->8---
So we could actually try to just change all #include <half.h> with
  #include <Imath/half.h> in the blender source code. How can one
  achieve that?

But even if this works, we still have the problem that Cycles need to
have the old version of OpenEXR.

As long as this problem with configuring Cycles with newer versions of
OpenEXR and Imath fails I see no way around.

Happy hacking,

Théo


      reply	other threads:[~2022-05-26 12:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 13:05 Blender export backend missing Théo Maxime Tyburn
2022-05-19 14:00 ` Maxime Devos
2022-05-19 21:52   ` Théo Maxime Tyburn
2022-05-20 21:36   ` Théo Maxime Tyburn
2022-05-20 22:03     ` Ekaitz Zarraga
2022-05-22 13:49       ` Théo Maxime Tyburn
2022-05-22 18:02         ` Ekaitz Zarraga
2022-05-26 10:56           ` Théo Maxime Tyburn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgj4lbva.fsf@gmail.com \
    --to=theo.tyburn@gmail.com \
    --cc=ekaitz@elenq.tech \
    --cc=guix-devel@gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.