pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't compile flac



Hi,
I changed the Makefle and tried your patches. "patch-config.h.in" and "patch-configure.ac" seemed to work fine but patch-src_libFLAC_cpu.c didn't work.

nbqc1-mppc1# patch -b < /tmp/patch-config.h.in
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD$
|
|--- config.h.in.orig   2019-12-16 17:08:45.972074284 +0000
|+++ config.h.in
--------------------------
Patching file config.h.in using Plan A...
Hunk #1 succeeded at 249.
done
nbqc1-mppc1# patch -b < /tmp/patch-configure.ac
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD$
|
|--- configure.ac.orig  2019-12-16 17:00:33.348861095 +0000
|+++ configure.ac
--------------------------
Patching file configure.ac using Plan A...
Hunk #1 succeeded at 103.
done
nbqc1-mppc1# patch -b < /tmp/patch-src_libFLAC_cpu.c
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|$NetBSD$
|
|--- src/libFLAC/cpu.c.orig     2018-08-20 08:17:21.000000000 +0000
|+++ src/libFLAC/cpu.c
--------------------------
Patching file src/libFLAC/cpu.c using Plan A...
Hunk #1 failed at 53.
Hunk #2 failed at 236.
2 out of 2 hunks failed--saving rejects to src/libFLAC/cpu.c.rej
done
nbqc1-mppc1# cat src/libFLAC/cpu.c.rej
@@ -53,7 +53,7 @@
 #define dfprintf(file, format, ...)
 #endif

-#if defined FLAC__CPU_PPC
+#if (defined(FLAC__CPU_PPC) && defined(HAVE_SYS_AUXV_H))
 #include <sys/auxv.h>
 #endif

@@ -236,7 +236,7 @@
 static void
 ppc_cpu_info (FLAC__CPUInfo *info)
 {
-#if defined FLAC__CPU_PPC
+#if (defined(FLAC__CPU_PPC) && defined(HAVE_GETAUXVAL))
 #ifndef PPC_FEATURE2_ARCH_3_00
 #define PPC_FEATURE2_ARCH_3_00         0x00800000
 #endif

I made the changes from   patch-src_libFLAC_cpu.c manually, re-compiled and now it works.

Thanks !


On Mon, Dec 16, 2019 at 12:53 PM Niclas Rosenvik <nros%netbsd.org@localhost> wrote:
On Sun, 15 Dec 2019 01:13:25 -0500
Julien Savard <juliensavard17%gmail.com@localhost> wrote:

> Hi,
> I'm getting this error when compiling flac (as a dependency of vlc) :
>
>
> gmake[4]: Entering directory
> '/var/tmp/pkgbuild/audio/flac/work/flac-1.3.3/src/libFLAC'
>   CC       bitmath.lo
>   CC       bitreader.lo
>   CC       bitwriter.lo
>   CC       cpu.lo
> cpu.c:57:22: fatal error: sys/auxv.h: No such file or directory
> compilation terminated.
> gmake[4]: *** [Makefile:732: cpu.lo] Error 1
> gmake[4]: *** Waiting for unfinished jobs....
> gmake[4]: Leaving directory
> '/var/tmp/pkgbuild/audio/flac/work/flac-1.3.3/src/libFLAC'
> gmake[3]: *** [Makefile:794: all-recursive] Error 1
> gmake[3]: Leaving directory
> '/var/tmp/pkgbuild/audio/flac/work/flac-1.3.3/src/libFLAC'
> gmake[2]: *** [Makefile:433: all-recursive] Error 1
> gmake[2]: Leaving directory
> '/var/tmp/pkgbuild/audio/flac/work/flac-1.3.3/src'
> gmake[1]: *** [Makefile:492: all-recursive] Error 1
> gmake[1]: Leaving directory
> '/var/tmp/pkgbuild/audio/flac/work/flac-1.3.3' gmake: ***
> [Makefile:424: all] Error 2 *** Error code 2
>
>
> Compiling 2019Q3 on macppc.
> Any idea ?

This is due to patches added to check for power8 and power9
processors[1]. They have fixed this upstream[2] but not in the right
way I think. I have applied patches for it in the mail. I will commit
these to pkgsrc-current if they work for you. (I don't have a macppc to
test on)

Regards,
Niclas Rosenvik

1:https://github.com/xiph/flac/commit/8e1796b91a1893609b8e2f5813d08f7df3f011cf#diff-9f048b83ff55071de36263cf0f403b2e
2:https://github.com/xiph/flac/commit/44036c9a9b45d03373fe90e9c112852bfc054c51#diff-67e997bcfdac55191033d57a16d1408a


Home | Main Index | Thread Index | Old Index