LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compiling libmpeg3 on FC4 PPC (https://www.linuxquestions.org/questions/linux-software-2/compiling-libmpeg3-on-fc4-ppc-349000/)

duvalgo 08-01-2005 05:27 PM

Compiling libmpeg3 on FC4 PPC
 
Hello,

I'm running Fedora Core 4 on a iMac G4. I i'm trying to install libmpeg3, so that I can compile transcode, which I need to install dvd::rip. There are to PPC RPM's so I tried a SRPM and get the following error (I get the same error when I try to compile directly from source):

Code:

mpeg3io.c:213: error: storage size of 'file_st' isn't known
mpeg3io.c:213: error: storage size of 'device_st' isn't known
make: *** [ppc/mpeg3io.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.96104 (%build)


RPM build errors:
    user machbuild does not exist - using root
    group machbuild does not exist - using root
    user machbuild does not exist - using root
    group machbuild does not exist - using root
    user machbuild does not exist - using root
    group machbuild does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.96104 (%build)

Any help with this problem would be appreciated.

cthinh 08-01-2005 06:28 PM

You must login with root account to install it

duvalgo 08-01-2005 06:40 PM

I am the root. Also, I get the same problem when I try to compile it from source:

Code:

mpeg3io.c:213: error: storage size of 'file_st' isn't known
mpeg3io.c:213: error: storage size of 'device_st' isn't known
make: *** [ppc/mpeg3io.o] Error 1

I don't see why this fails.

foo_bar_foo 08-01-2005 06:40 PM

try this
http://linuxfromscratch.org/pipermai...ry/004810.html

duvalgo 08-01-2005 06:57 PM

THANKS!! That fixed the first error, but now I get:

Code:

video/output.c: In function ‘mpeg3video_ditherframe’:
video/output.c:722: error: invalid lvalue in increment
video/output.c:747: error: invalid lvalue in increment
video/output.c:787: error: invalid lvalue in increment
video/output.c:812: error: invalid lvalue in increment
make: *** [ppc/video/output.o] Error 1

Thanks a lot for the help!

BTW I think I am going to replace FC4 with Gentoo. I hear portage is better for a PPC arch.

foo_bar_foo 08-01-2005 11:15 PM

the problem is gcc4 no longer likes invalid code (crazy gcc people think we should actually learn what we are doing) -- actually they took away a cast extension we got used to
the offending definition is
STORE_PIXEL_RGB565
which is at line 503 in /video/output.c
Code:

#define STORE_PIXEL_RGB565 \
        *((unsigned short*)data)++ = \
                ((CLIP(r_l) & 0xf8) << 8) | \
                ((CLIP(g_l) & 0xfc) << 3) | \
                ((CLIP(b_l) & 0xf8) >> 3);



try replacing the above with
Code:

#define STORE_PIXEL_RGB565 \
        *(*(unsigned short**)(&data))++ = \
                ((CLIP(r_l) & 0xf8) << 8) | \
                ((CLIP(g_l) & 0xfc) << 3) | \
                ((CLIP(b_l) & 0xf8) >> 3);

and go down to 532 where it says
Code:

        register unsigned char *data;
and take away the word register to make it like this
Code:

unsigned char *data;

duvalgo 08-02-2005 07:25 AM

Thanks very much foo_bar_foo! Now it compiles cleanly. I just have one last question. How can I make these changed to a SRPM so that I can build an RPM? For some reason the SRPM for transcode does not recognise when I install directly from the source. It says:

Code:

error: Failed build dependencies:
        libmpeg3 is needed by transcode-0.6.12-5.dag.ppc

Even though I correctly installed libmpeg3. Thanks very much for the help so far!

foo_bar_foo 08-03-2005 05:55 PM

i don't really know how to do that but this is the tutorial
http://www.rpm.org/RPM-HOWTO/build.html
and
http://bradthemad.org/tech/notes/patching_rpms.php

it's been a long time since i used the rpm thingy
i think you can just install the srpm (rpm -ivh package.src.rpm)
then go to the src/rpm/SOURCES or wherever it is and change it there
installing will put the specs file in src/rpm/SPECS ?
then to build
rpmbuild -ba SPECS/package.spec
will make an rpm in the RPMS folder


All times are GMT -5. The time now is 04:13 AM.