Git Product home page Git Product logo

Comments (30)

toots avatar toots commented on August 18, 2024 1

Cross-compiling is hard.. ;-)

from shine.

toots avatar toots commented on August 18, 2024 1

And also the error you see. @zhaoxiu-zeng has worked a lot on this file, maybe he'll be able to help us pinpoint the issue.

from shine.

toots avatar toots commented on August 18, 2024

Have you installed libshine? If so, how did you install it?

from shine.

xuing avatar xuing commented on August 18, 2024

Sorry,I probablely installed libshine failed. I install ffmpeg success。

I run

xpf@xpf-VirtualBox:~/lede$ ./scripts/feeds install shine

But, It doesn't have any output.

Then I try to this

xpf@xpf-VirtualBox:~/lede/feeds/packages/sound/shine$ ls
Makefile patches

xpf@xpf-VirtualBox:~/lede/feeds/packages/sound/shine$ ls
Makefile:8: /rules.mk: No such file or directory
Makefile:26: /package.mk: No such file or directory
make: *** No rule to make target '/package.mk'. stop.

Thank you.

from shine.

toots avatar toots commented on August 18, 2024

What OS are you using?

from shine.

xuing avatar xuing commented on August 18, 2024

Ubuntu 17.10 X64

from shine.

toots avatar toots commented on August 18, 2024

So you should try:

sudo apt-get install libshine-dev

from shine.

xuing avatar xuing commented on August 18, 2024

The output said I have already installed libshine-dev (3.1.1-1)

from shine.

toots avatar toots commented on August 18, 2024

Ok that's good! How are you installing ffmpeg?

from shine.

toots avatar toots commented on August 18, 2024

Oh wait you're building for a embedded firmware right?

from shine.

xuing avatar xuing commented on August 18, 2024

Yes :D

from shine.

toots avatar toots commented on August 18, 2024

Ok, can you tell me more about the steps you're using to build the thing?

from shine.

toots avatar toots commented on August 18, 2024

Also, you should probably report the issue here: openwrt/packages#4216 We do not control the build system for lede here unfortunately..

from shine.

xuing avatar xuing commented on August 18, 2024

I already report issue openwrt/packages#5181
My English is poor,Hope you can understand.

from shine.

toots avatar toots commented on August 18, 2024

No problem! From what I see you should be looking for a way to have libshine cross-compiled for the target architecture. This command: ./scripts/feeds install shine was also referenced in the other issue as the place to start.

Also, another possibility is to disable libshine when building ffmpeg. You should need libshine only if you plan to compress to mp3 format on an architecture that has no floating point unit (FPU), otherwise, any other mp3 library such as lame should be okay.

from shine.

xuing avatar xuing commented on August 18, 2024

I don't need it now,How can I disable libshine?
I can't write the makefile. I mean I don't know
Thank You very much!

from shine.

xuing avatar xuing commented on August 18, 2024

It seems work!
I open the Makefile of ffmpeg. And Replace enable with disable about libshine.

from shine.

xuing avatar xuing commented on August 18, 2024

Thanks Again!

from shine.

toots avatar toots commented on August 18, 2024

Awesome!

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

Hi @toots - Sorry to pick up on this thread, but I am also having an issue and have been at this for some weeks now. Was trying not to bother anyone but Im relatively n00b and im 99% sure you will point me to my error very quickly!

Objective is to encode live mp3 audio (for onward push via ffmpeg to various streaming servers via either icecast or rtmp) using linkit 7688 or linkit 7688 duo SOC. The current firmwares / packages and ffmpeg distros installed with opkg seem to have had libshine dropped (patent issues?). I managed to cross compile libmp3lame and ffmpeg as a dependancy and it 'works' functionally but is too slow to deal with live audio.

So i have set about trying to cross compile my own ffmpeg release with libshine enabled. I may be going the wrong / complicated way around this, so feel free to point me at a simple way! (Google has left me confused - but your name turns up in lots of places and I see the shine source is released on your git profile so ... fingers crossed: >>>

I have setup the toolchain on the new Ubuntu box, installed the general dependancies etc. Grabbed the various sources, unpacked them, and so far seem to have a 'working' toolchain (since i got ffmpeg and libmp3lame to work with it).

For simplicity here is my notes which i was attempting to turn into a build script, although i have annotated it and pasted in the 'fail' responses. I think it is as clear as i can make what i am doing.

Feel free to tell me im stupid and doing it all wrong!! But if there is a simple correction to my course i would deeply value your input:

Clean Ubuntu 16.04 machine

sudo apt-get update
sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk
sudo apt-get install gcc-multilib flex git-core gettext libssl-dev ccache
wget -O toolchain.tar.bz2 https://labs.mediatek.com/en/download/2whWQCuB
sudo tar -xvjf toolchain.tar.bz2
mv OpenWrt-Toolchain-ramips-mt7688_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/ toolchain/
mkdir staging_dir
export PATH=$PATH:/home/d2/toolchain/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/
export CCPREFIX="/home/d2/toolchain/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-"
export STAGING_DIR="/home/d2/FFmpeg/staging_dir/"
pkg_config=$(which pkg-config) PKG_CONFIG_PATH=/home/d2/staging_dir/lib/pkgconfig

sudo apt-get install libtool m4 automake
git clone https://github.com/toots/shine.git
cd shine
libtoolize
autoreconf -i
./configure --host=mipsel-openwrt-linux-uclibc --enable-static --disable-shared --prefix=/home/d2/staging_dir/shine/ --exec-prefix=/home/d2/staging_dir/shine-mips/
make

Fails as follows

depbase=echo src/lib/l3mdct.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';
/bin/bash ./libtool --tag=CC --mode=compile mipsel-openwrt-linux-uclibc-gcc -DPACKAGE_NAME="shine" -DPACKAGE_TARNAME="shine" -DPACKAGE_VERSION="3.1.1" -DPACKAGE_STRING="shine\ 3.1.1" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="shine" -DVERSION="3.1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -g -O2 -funroll-loops -fno-exceptions -Wall -O2 -fsigned-char -MT src/lib/l3mdct.lo -MD -MP -MF $depbase.Tpo -c -o src/lib/l3mdct.lo src/lib/l3mdct.c &&
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: mipsel-openwrt-linux-uclibc-gcc -DPACKAGE_NAME="shine" -DPACKAGE_TARNAME="shine" -DPACKAGE_VERSION="3.1.1" "-DPACKAGE_STRING="shine 3.1.1"" -DPACKAGE_BUGREPORT="[email protected]" -DPACKAGE_URL="" -DPACKAGE="shine" -DVERSION="3.1.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -I. -g -O2 -funroll-loops -fno-exceptions -Wall -O2 -fsigned-char -MT src/lib/l3mdct.lo -MD -MP -MF src/lib/.deps/l3mdct.Tpo -c src/lib/l3mdct.c -o src/lib/l3mdct.o
/tmp/cc5QhOY0.s: Assembler messages:
/tmp/cc5QhOY0.s:697: Error: opcode not supported on this processor: mips1 (mips1) madd $25,$4' /tmp/cc5QhOY0.s:706: Error: opcode not supported on this processor: mips1 (mips1) madd $24,$5'
/tmp/cc5QhOY0.s:717: Error: opcode not supported on this processor: mips1 (mips1) madd $23,$4' /tmp/cc5QhOY0.s:728: Error: opcode not supported on this processor: mips1 (mips1) madd $21,$13'
/tmp/cc5QhOY0.s:739: Error: opcode not supported on this processor: mips1 (mips1) madd $31,$5' /tmp/cc5QhOY0.s:751: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:763: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:775: Error: opcode not supported on this processor: mips1 (mips1) madd $17,$5'
/tmp/cc5QhOY0.s:786: Error: opcode not supported on this processor: mips1 (mips1) madd $15,$4' /tmp/cc5QhOY0.s:797: Error: opcode not supported on this processor: mips1 (mips1) madd $14,$13'
/tmp/cc5QhOY0.s:808: Error: opcode not supported on this processor: mips1 (mips1) madd $20,$5' /tmp/cc5QhOY0.s:819: Error: opcode not supported on this processor: mips1 (mips1) madd $12,$4'
/tmp/cc5QhOY0.s:830: Error: opcode not supported on this processor: mips1 (mips1) madd $11,$13' /tmp/cc5QhOY0.s:841: Error: opcode not supported on this processor: mips1 (mips1) madd $10,$5'
/tmp/cc5QhOY0.s:853: Error: opcode not supported on this processor: mips1 (mips1) madd $9,$4' /tmp/cc5QhOY0.s:864: Error: opcode not supported on this processor: mips1 (mips1) madd $8,$13'
/tmp/cc5QhOY0.s:875: Error: opcode not supported on this processor: mips1 (mips1) madd $7,$5' /tmp/cc5QhOY0.s:887: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:899: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:911: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:921: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:932: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13'
/tmp/cc5QhOY0.s:942: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4' /tmp/cc5QhOY0.s:952: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:962: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:972: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13'
/tmp/cc5QhOY0.s:981: Error: opcode not supported on this processor: mips1 (mips1) madd $18,$4' /tmp/cc5QhOY0.s:990: Error: opcode not supported on this processor: mips1 (mips1) madd $19,$5'
/tmp/cc5QhOY0.s:1001: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:1011: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:1021: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4' /tmp/cc5QhOY0.s:1031: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13'
/tmp/cc5QhOY0.s:1041: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$13' /tmp/cc5QhOY0.s:1051: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4'
/tmp/cc5QhOY0.s:1061: Error: opcode not supported on this processor: mips1 (mips1) madd $5,$4' /tmp/cc5QhOY0.s:1116: Error: opcode not supported on this processor: mips1 (mips1) msub $23,$4'
/tmp/cc5QhOY0.s:1130: Error: opcode not supported on this processor: mips1 (mips1) madd $15,$23' /tmp/cc5QhOY0.s:1169: Error: opcode not supported on this processor: mips1 (mips1) msub $3,$4'
/tmp/cc5QhOY0.s:1183: Error: opcode not supported on this processor: mips1 (mips1) madd $15,$3' /tmp/cc5QhOY0.s:1225: Error: opcode not supported on this processor: mips1 (mips1) msub $11,$4'
/tmp/cc5QhOY0.s:1239: Error: opcode not supported on this processor: mips1 (mips1) madd $15,$11' /tmp/cc5QhOY0.s:1281: Error: opcode not supported on this processor: mips1 (mips1) msub $21,$4'
/tmp/cc5QhOY0.s:1295: Error: opcode not supported on this processor: mips1 (mips1) madd $15,$21' /tmp/cc5QhOY0.s:1335: Error: opcode not supported on this processor: mips1 (mips1) msub $fp,$6'
/tmp/cc5QhOY0.s:1354: Error: opcode not supported on this processor: mips1 (mips1) madd $17,$fp' /tmp/cc5QhOY0.s:1395: Error: opcode not supported on this processor: mips1 (mips1) msub $2,$fp'
/tmp/cc5QhOY0.s:1413: Error: opcode not supported on this processor: mips1 (mips1) madd $21,$2' /tmp/cc5QhOY0.s:1454: Error: opcode not supported on this processor: mips1 (mips1) msub $13,$2'
/tmp/cc5QhOY0.s:1473: Error: opcode not supported on this processor: mips1 (mips1) madd $24,$13' /tmp/cc5QhOY0.s:1514: Error: opcode not supported on this processor: mips1 (mips1) msub $8,$13'
/tmp/cc5QhOY0.s:1532: Error: opcode not supported on this processor: mips1 (mips1) `madd $25,$8'
Makefile:583: recipe for target 'src/lib/l3mdct.lo' failed
make: *** [src/lib/l3mdct.lo] Error 1

Tried to do the following anyway

cd
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg/

./configure --enable-cross-compile --cross-prefix=mipsel-openwrt-linux-uclibc- --arch=mipsel --target-os=linux --prefix=/home/d2/staging_dir/ffmpeg/ --pkg-config=pkg-config --enable-nonfree --disable-static --enable-shared --enable-libshine --enable-small --enable-pthreads --disable-runtime-cpudetect --disable-doc --disable-debug --enable-gpl --enable-version3 --disable-altivec --disable-amd3dnow --disable-amd3dnowext --disable-mmx --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-xop --disable-fma3 --disable-fma4 --disable-avx2 --disable-vfp --disable-neon --disable-inline-asm --disable-x86asm --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-dxva2 --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --extra-ldflags=-L/home/d2/staging_dir/shine-mips/lib/ --extra-cflags=-I/home/d2/staging_dir/shine/include/

Which Failed with

ERROR: shine not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

Incidentally shine IS available from the linkit OpenWRT ChaosCalmer opkg package distro, but the corresponding ffmpeg doesn't have it enabled..

from shine.

toots avatar toots commented on August 18, 2024

@dom-robinson have you tried adjusting the PKG_CONFIG_PATH env variable? Alternatively, if shine is available, maybe you can submit a request to enable it in their ffmpeg build and, also, do it yourself using their own build system?

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

Cheers @toots ! i'm thinking its the initial compile of shine (outlined in the first half of my 'wall of text' (apologies!) with the linkit toolchain (rather than the ffmpeg compile in the second half) that is the key fault.

Im working on how to properly link the shine compile to the tool chain, and once that is build for the mips1 arch im hoping the ffmpeg build will 'just run'...

..will explore the PKG_CONFIG_PATH env variable some more.

(jeepers - cross compiling for a n00b is confusing stuff!!)

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

Hey @toots - managed to get there in the end: - i had to use shine 2.0.0 from https://github.com/toots/shine/releases/ (was a lucky guess tbh) :- the l3mdct kept giving me the opcode error.

I tried backtracking each version from the release history and the problem seems to appear as you added support for MPEG-II. i guess 'dct' = direct cosign transforms used for mpeg II, and that is probably beyond the processor arch?

Anyway - not quite managed to get the ffmpeg linked to it yet, but having already had libmp3lame compiling with ffmpeg i think that will take me less time now. At that point ill find out if my simple live mp3 icecast encode will actually work without whatever functionality that l3mdct added.

from shine.

toots avatar toots commented on August 18, 2024

Thanks for the effort. Do you have a specific commit where it starts failing? Thks!

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

not tried with each of the individual 2.0... commits (having fun with pkg-config and ffmpeg at the moment grr)

Once i get my whole workflow running ill try to revisit for you. For now all i know is that this source cross compiled https://github.com/toots/shine/archive/2.0.0.tar.gz and the one after (https://github.com/toots/shine/releases/download/3.0.0/shine-3.0.0.tar.gz) gave me the opcode error...

from shine.

toots avatar toots commented on August 18, 2024

Ok. Send us the error message also if you have a chance, that can go a long way.

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

So (clipped from my wall of text above) the error i get on any later version than 2.0.0 is this:

src/lib/l3mdct.lo -MD -MP -MF src/lib/.deps/l3mdct.Tpo -c src/lib/l3mdct.c -o src/lib/l3mdct.o
/tmp/cc5QhOY0.s: Assembler messages:
/tmp/cc5QhOY0.s:697: Error: opcode not supported on this processor: mips1 (mips1) madd $25,$4' /tmp/cc5QhOY0.s:706: Error: opcode not supported on this processor: mips1 (mips1)madd $24,$5'
/tmp/cc5QhOY0.s:717: Error: opcode not supported on this processor: mips1 (mips1) madd $23,$4' /tmp/cc5QhOY0.s:728: Error: opcode not supported on this processor: mips1 (mips1)madd $21,$13
.......

For ref Ted Hess (on the OpenWrt forums) made this comment on a private mail thread...

Also, I am not at all familiar with the Linkit toolkit but giving it a quick glance, it seems to be based on a much older GCC/uClibc toolchain than we are currently using. I’m not saying that is your problem but we have long moved on from GCC 4.8 and uClibc. It may be however, just a matter of specifying the right cpu type options in your build of libshine – I don’t know.

So it may not be the source in error - it may be my toolchain / GCC...

Hope that is useful..

from shine.

toots avatar toots commented on August 18, 2024

Ok, thanks. I think I've fixed it. Our tests to detect wether to enable MIPS assembly routines was not taking into account mips1 and so. Should be fixed in the latest code now, thanks for reporting.

from shine.

dom-robinson avatar dom-robinson commented on August 18, 2024

Confirmed - Compiled first time! Thank you @toots

from shine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.