POVRAY: Compiling on manjaro?

he want’s to modify the source prior to building

Right. If he’d actually tell us what he wants to do, then maybe we could help. Ahem @MichaelAfSjaelland

Modify the source code, but if so, what do I ask for?

sudo pacman -S povray

Understand?

T+ = So long

yes - but:
he want’s to modify the source this package is built from
build a modified package from it
so:
installing the unmodified package … will not do :wink:
not for him, anyways …

Cheers!

Well, I think I did say what I actually wanted to do, namely, compile povray from source. If I wanted to download the package and run a stock povray I would have done that.

git clone -b packages/povray --single-branch https://github.com/archlinux/svntogit-community.git povray
cd povray/trunk/
makepkg -o

Do whatever the hell you want with the source files in src/…

makepkg -ei
1 Like

Ok thanks, I’m getting it it by bit. I renamed the arch_pov.sh script to PKGMAN and said:

mkpkg

The script failed with error (last 3 lines):

==> Retrieving sources…
→ Found povray-3.7.0.8.tar.gz
==> ERROR: povray-openexr3.patch was not found in the build directory and is not a URL.

on this line:

source=("$pkgname-$pkgver.tar.gz::https://github.com/POV-Ray/povray/archive/v$pkgver.tar.gz"
         povray-openexr3.patch)

Sorry about the weird formatting

The PKGBUILD for this standard package seems a little different than what I normally deal with - packages from the AUR
I usually do not recompile packages which are … available as a precompiled package.

The referenced patch, the patch you need/the PKGBUILD needs
is in the same diretory as the PKGBUILD:

svntogit-community/trunk at packages/povray · archlinux/svntogit-community · GitHub

get it from there and put it with the PKGBUILD

Thanks Moson, I tried what you said. ./configure is still failing with:

checking whether to use the JPEG library... yes
checking for library containing jpeg_std_error... no
configure: error: cannot find a suitable JPEG library

but now I’m over the openexr patch thing, thanks for that. I’ve been looking for that elusive jpeg library that has a ‘jpeg_std_error’, but maybe I’m barking up the wrong tree. Any ideas?

Thanks, I hadn’t seen that

You seem to be missing a library. Try installing libjpeg-turbo

sudo pacman -Syu libjpeg-turbo

Then try to compile again.

tried it…same thing:

checking for libz version >= 1.2.1... 1.2.11, ok
checking whether to use the PNG library... yes
checking for library containing png_get_libpng_ver... -lpng
checking for png.h... yes
checking for libpng version >= 1.2.5... 1.6.37, ok
checking whether to use the JPEG library... yes
checking for library containing jpeg_std_error... no
configure: error: cannot find a suitable JPEG library

I’m wondering if I screwed up the configuration of my daily workhorse somewhere, being a newbie an’ all, and that maybe I should try this in a VM on a freshly installed distro.

Right, but the package is already compiled from source. There’s no need, unless…

Why? And do what? That’s what you haven’t told us. It’s a bit hard to help if you can’t tell us what your end goal here is. This appears to be an XY Problem.

If you would have followed @moson’s instructions above, that wouldn’t have happened.

Without looking, that may or may not effect anything. It’s named that way for a reason and other things may look for it and won’t find it. Keep going willy-nilly changing things without knowing what you’re doing and you’re going to break it.

You’re getting too far ahead of yourself. This is like buying a brand new car and asking how you take it apart and put it back together again because you want to modify it without telling anyone why or what you want to modify. You also didn’t know what tools you needed to do it, but yet you’re out in the garage fiddling with a socket wrench anyway.

Look, I’m not looking for fight here, just looking for some help. I’m new to arch-based disros, ok? If I need to go into explicit details of why I want to compile from source, I get he feeling that this isn’t a serious way to approach this issue.

What, when and how I plan to modify code on my own machine is up to me, and I don’t need to answer questions that are clearly out of the scope of the stated problem. I don’t mean to be impolite, but, c’mon.

the patch goes into the “src” directory - which is created when the povray source gets unpacked

It is a little more complicated - at least for me - than building a normal package from AUR.

Next thing you’ll need to do is adapt the PKGBUILD - it will fail to get the patch since it is not an URL in the PKGBUILD

… or I’m just not set up to build regular repository packages
a simple makepkg is definitely not enough for me here
and that is without modification … :wink:

edit:
When the ABS is set up and used, the process becomes easier.
It basically involves adapting /etc/makepkg.conf to your liking
by uncommenting and adapting a few paths like
BUILDDIR, PKGDEST, SRCDEST, SRCPKGDEST …
(which I all pointed into a directory in my $HOME)

https://wiki.archlinux.org/index.php/Arch_Build_System

Cool, thanks. This is great stuff., and I really appreciate the effort you guys put into this. I’ll take what you suggested and get respond - a lot to learn here :slight_smile:

After much adjusting I finally got pov to compile. I decided to forego jpeg support and configured the build to exclude libjpeg.

Thanks for all the assistance! :slight_smile:

If anyone’s interested, my locally built version runs the benchmark on my old laptop in 169 seconds vs. 187 seconds for the version from the repo.

1 Like

And if you compile it with even less libraries, it will run even faster. How about a real scene you render?

just some observation - I was curious …

Without any adjustments the program builds flawlessly in less than 10 minutes (on my machine).
config.log says:

$ ./configure 'LIBS=-lboost_system -lboost_thread' 'COMPILED_BY=Arch Linux' --sysconfdir=/etc --prefix=/usr

and further down, checking for the jpeg lib:

configure:9373: result: -ljpeg
1152   │ configure:9381: checking for jpeglib.h
1153   │ configure:9381: g++ -c -march=native -O2 -pipe -fno-plt -pthread -D_FORTIFY_SOURCE=2 -pthread -I/usr/include conftest.cpp >&5
1154   │ configure:9381: $? = 0
1155   │ configure:9381: result: yes
1156   │ configure:9387: checking for libjpeg version >= 6b (62)

so, it is used when it is present on the system
jpeg support is the default

But maybe you specifically wanted to exclude it and this took some adjusting.

Thanks for the tip - I’ll try it and see. I’m only really interested in ppm image output anyway.