View Full Version : L-SMASH Source
an3k
13th January 2016, 01:05
Yes, you first need https://github.com/l-smash/l-smash and then you can build https://github.com/VFR-maniac/L-SMASH-Works
Just ./configure && make && make install will suffice, I'm not sure what you mean by "make install inside the VapourSynth directory" but I think it's difficult to go wrong with this.
Ok, thank you. These are the steps I took on a clean Ubuntu Server 14.04.3 installation with the required packages (git, gcc) already installed:
1) git clone https://github.com/l-smash/l-smash.git
2) cd l-smash/
3) ./configure
4) make
5) make install
6) cd ../
7) git clone https://github.com/VFR-maniac/L-SMASH-Works.git
8) cd L-SMASH-Works/
9) ./configure
Here I'm getting an error ("-bash: ./configure: No such file or directory") because there is no file at all (except .gitignore) in this directory but four directories AviSynth, AviUtil, common and VapourSynth. Only in AviUtil and VapourSynth I can find a file called configure and because I need L-SMASH for VS I guess I have to cd into that directory before ./configure (That's what I meant with "make install inside the VapourSynth directory" :)) thus
10) cd VapourSynth/
11) ./configure
Here I experience the next error (the same I experienced every time I tried it before) and I have no clue why:./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
warning: pkg-config or pc files not found, lib detection may be inaccurate.
checking for liblsmash...
error: liblsmash checking failed
error: lsmash.h might not be installed or some libs missing.
l-smash compiled and got installed correctly, not a single warning or error and the default path configure for L-SMASH Works uses (/usr/local/ and /usr/local/lib/) are correct. I even symlinked liblsmash.pc and lsmash.h into ~/L-SMASH-Works/VapourSynth directory and also into ~/L-SMASH-Works/common but that doesn't helped too.
I guess I'm missing here something?!
qyot27
13th January 2016, 01:41
sudo apt-get install checkinstall
L-SMASH:
git clone git://github.com/l-smash/l-smash.git
cd l-smash
./configure
make -j$(nproc)
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
LSMASHSource:
git clone git://github.com/VFR-maniac/L-SMASH-Works.git
cd L-SMASH-Works/VapourSynth
./configure
make -j$(nproc)
sudo checkinstall --pkgname=vslsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
an3k
13th January 2016, 04:24
I noticed a problem with the configure script itself. Without ffmpeg installed it shows the following error./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
warning: pkg-config or pc files not found, lib detection may be inaccurate.
checking for liblsmash...
error: liblsmash checking failed
error: lsmash.h might not be installed or some libs missing.However, with ffmpeg installed is shows./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
checking for liblsmash...
checking for libavformat...
checking for libavcodec...
checking for libswscale...
settings...
CC = gcc
LD = gcc
STRIP = strip
CFLAGS = -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include
LDFLAGS = -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib -shared
LIBS = -pthread -L/usr/local/lib -llsmash -lavformat -lavcodec -lswresample -lswscale -lavutil -lm
SONAME = libvslsmashsource.so.868
SOFLAGS = -Wl,-soname,libvslsmashsource.so.868
PREFIX = /usr/local
VSPLUGINDIR = ${libdir}/vapoursynth
configure finished.
type 'make' : compile libvslsmashsource.so.868So the problem is that if libavformat and/or libavcodec and/or libswscale is not present it shows that liblsmash is not present (which in fact is).
Now, after configure successfully finishes I went onto make and I get a new error:gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -c ../common/lwlibav_audio.c -o ../common/lwlibav_audio.o
../common/lwlibav_audio.c:31:63: fatal error: libavresample/avresample.h: No such file or directory
#include <libavresample/avresample.h> /* Resampler/Buffer */
^
compilation terminated.
make: *** [../common/lwlibav_audio.o] Error 1
After cp'ing the libavresample directory from the ffmpeg-2.8.4 directory (after ffmpeg was ./configure'd && make'ed && make install'ed) into the L-SMASH-Works/VapourSynth directory I get past this point but then a new error occurs:gcc -Wl,-soname,libvslsmashsource.so.868 -fPIC -L. -L/usr/local/lib -L/usr/local/lib -shared -Wl,-s -o libvslsmashsource.so.868 lsmashsource.o video_output.o libavsmash_source.o lwlibav_source.o \
../common/utils.o ../common/qsv.o ../common/libavsmash.o ../common/libavsmash_video.o ../common/lwlibav_dec.o ../common/lwlibav_video.o ../common/lwlibav_audio.o ../common/lwindex.o \
../common/video_output.o -pthread -L/usr/local/lib -llsmash -lavformat -lavcodec -lswresample -lswscale -lavutil -lm
/usr/bin/ld: /usr/local/lib/liblsmash.a(description.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblsmash.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libvslsmashsource.so.868] Error 1However, this error is gone after you go back into the ffmpeg-2.8.4 directory and do
1) ./configure --enable-shared
2) make
3) make install
And at this point ffmpeg, l-smash and L-Smash Works were successfully built and installed. But the remaining question is: Is all of this the expected behavior, especially the manual cp of the libavresample directory? :)
sudo apt-get install checkinstall
L-SMASH:
git clone git://github.com/l-smash/l-smash.git
cd l-smash
./configure
make -j$(nproc)
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
LSMASHSource:
git clone git://github.com/VFR-maniac/L-SMASH-Works.git
cd L-SMASH-Works/VapourSynth
./configure
make -j$(nproc)
sudo checkinstall --pkgname=vslsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --defaultThis is excellent. Thank you very much for that! Since I don't want all the required configure & make dependencies on the final server I really love it. One short question: How do I know if I have to use --stripso=yes and/or --addso=yes or not?
qyot27
13th January 2016, 05:53
--addso=yes is necessary for any shared libraries, so you don't have to run sudo ldconfig. --stripso=yes is mostly to make sure the shared libs are stripped, which really only cuts down on filesize (and may have an impact on install speed, since it takes less time to cp the files into the install dirs); for libs that don't strip automatically for non-debug builds, --stripso=yes will take care of that.
Just build FFmpeg with avresample support (--enable-avresample). The issue with the -fPIC error is due to PIC being required on 64-bit. Using --enable-pic when configuring FFmpeg may avert that error if you still want those as static rather than shared.
an3k
15th January 2016, 16:59
--addso=yes is necessary for any shared libraries, so you don't have to run sudo ldconfig. --stripso=yes is mostly to make sure the shared libs are stripped, which really only cuts down on filesize (and may have an impact on install speed, since it takes less time to cp the files into the install dirs); for libs that don't strip automatically for non-debug builds, --stripso=yes will take care of that.
Just build FFmpeg with avresample support (--enable-avresample). The issue with the -fPIC error is due to PIC being required on 64-bit. Using --enable-pic when configuring FFmpeg may avert that error if you still want those as static rather than shared.
Thank you very much! I got everything I needed successfully compiled but all with shared libs and before I continue with static ones I want to fix some maybe errors I encounter.
When running this script through vspipe (or manually in Python) I get the below error:import vapoursynth as vs
# get the core instance
core = vs.get_core()
# open a video file; clip is now a clip object
clip = core.lsmas.LibavSMASHSource("sample.mkv")
# set the clip to be output
clip.set_output()vapoursynth@encoder:~$ vspipe test.vpy - | x264 --crf 22 --input-res 1920x1080 - -o sample_recode.264
raw [info]: 1920x1080p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
x264 [info]: profile High, level 4.0
[importer: Error]: failed to find the matched importer.
Script evaluation failed:
Python exception: [Fatal]: Failed to read an input file
Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 1489, in vapoursynth.vpy_evaluateScript (src/cython/vapoursynth.c:27016)
File "test.vpy", line 8, in <module>
clip = core.lsmas.LibavSMASHSource("sample.mkv")
File "src/cython/vapoursynth.pyx", line 1381, in vapoursynth.Function.__call__ (src/cython/vapoursynth.c:25311)
vapoursynth.Error: [Fatal]: Failed to read an input file
vapoursynth@encoder:~$
When I use the same test.vpy script but open a raw h.264 source I get the following error (this time no vspipe because it outputs nothing):vapoursynth@encoder:~$ python3.4
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import vapoursynth as vs
>>> core = vs.get_core()
>>> clip = core.lsmas.LibavSMASHSource("sample.264")
Segmentation fault (core dumped)as H.264
vapoursynth@encoder:~$Before Python crashes I see [H.264: Info]: Analyzing stream as H.264 where Segmentation fault (core dumped)as H.264 is in the above paste
EDIT: core.lsmas.LWLibavSource("sample.264") works perfectly also with the sample.mkv
qyot27
15th January 2016, 17:12
LibavSMASHSource is for MP4 (and probably MOV and other ISO Base Media) files only. LwLibavSource is the general-use source filter.
speedyrazor
16th January 2016, 18:31
Hi, I am using the below script to open a Quicktime Prores HQ (10 bit video) file which has multi channel / multi track audio (24 bit audio). Just want to check I am doing it correctly?
v=lsmashvideosource("movie.mov", stacked=true, format="YUY2")
a1 = lsmashAudioSource("movie.mov", track=1)
a2 = lsmashAudioSource("movie.mov", track=2)
a3 = lsmashAudioSource("movie.mov", track=3)
a4 = lsmashAudioSource("movie.mov", track=4)
a5 = lsmashAudioSource("movie.mov", track=5)
a6 = lsmashAudioSource("movie.mov", track=6)
a7 = lsmashAudioSource("movie.mov", track=7)
a = MergeChannels(a1,a2,a3,a4,a5,a6,a7)
AudioDub(a,v)
The file is opening and displaying picture and audio, but takes a couple of minutes to open a large 130GB HD file.
MysteryX
16th January 2016, 20:18
It takes time to open because it first needs to index the file. Which means, at the very least, reading 130GB from your hard drive. Then it caches the result in a file.
sneaker_ger
16th January 2016, 22:21
lsmashxxxxxsource does not create index files
LigH
16th January 2016, 23:14
But LSMASH{Audio|Video}Source can only read ISO Media containers, like e.g. MP4, 3GPP, or MOV ... oh, MOV. You are lucky. :D
But then there must be another reason why AviSynth with L-SMASH Works needs some time to prepare the access. Maybe it's in the structure of the MOV file so it needs to be scanned completely for all required header data.
an3k
17th January 2016, 03:31
LibavSMASHSource is for MP4 (and probably MOV and other ISO Base Media) files only. LwLibavSource is the general-use source filter.
That explains it. Thank you :)
speedyrazor
27th January 2016, 22:47
Hi, love using LibavSMASHSource as there is no indexing, but it seems there maybe an issue, as we are using this with VapourSynth and on quite a few video files it is crashing VSPipe, issue reported here:
http://forum.doom9.org/showthread.php?p=1753452&highlight=LWLibavSource+simply+doesn%27t+test.avi#post1753452
Myrsloik
28th January 2016, 17:34
I've already submitted a pull request that fixes a lot of the bad behavior that caused the crashes. As soon as the author merges it you'll at least be getting proper error messages and no crashes.
speedyrazor
28th January 2016, 20:41
I've already submitted a pull request that fixes a lot of the bad behavior that caused the crashes. As soon as the author merges it you'll at least be getting proper error messages and no crashes.
Is that fixes in Vapoursynth or LibavSMASHSource or both, just checking what I will need to update?
Good news though, thanks.
huhn
2nd February 2016, 13:29
someone an idea why i get: "cannot load file "C:\Program Files (x86)\AviSynth+\plugins64+\LSMASHSource.dll". platform returned code 1114: a dynamic link libary (DLL) initialiation routine failed."?
for LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\LSMASHSource.dll")
sl1pkn07
2nd February 2016, 13:32
and in plugin64? without +
huhn
2nd February 2016, 13:36
already tried that no change i even tried: D:\AviSynth\LSMASHSource.dll
the content of the folder is the folder avisynth from the 64 bit lsmash x64 7z
sl1pkn07
2nd February 2016, 13:44
have you installed vc++2015?
huhn
2nd February 2016, 13:48
i have installed 2015 redistributable 14.0.23506 32/64 bit. and "all" others too.
sl1pkn07
2nd February 2016, 13:51
and the rest of dlls? avcodec,avformat,avresampleavutil,swscale? (included in the zip)
huhn
2nd February 2016, 13:54
avcodec-57.dll, avformat-57.dll, avresample-3.dll, avutil-55.dll and swscale-4.dll are all in the plugin folder together with LSMASHsource.dll. do i need them in the system32 folder?
sl1pkn07
2nd February 2016, 13:56
no, not need put in system directory
works for me in the same directory of LSMASHsource.dll
i put in C:\Program Files (x86)\AviSynth+\plugins(64)
speedyrazor
2nd February 2016, 13:57
I see there is a new version on the link in the first post:
L-SMASH-Works-r875-20160202-64bit.7z
sl1pkn07
2nd February 2016, 13:58
I see there is a new version on the link in the first post:
works in same way on old or new version
huhn
2nd February 2016, 13:59
so i guess this is "yet another windows 10 user rights issue".
is there an easy way to change the default pluginfolder for avisynth+?
i didn't installed it in the program files folder but it still created the plugin folder there.
i guess some where deep in the registry?
LigH
2nd February 2016, 14:08
A Microsoft Community thread (http://answers.microsoft.com/en-us/windows/forum/windows_vista-networking/error-1114-dynamic-link-library-dll-intialization/f6245128-52f8-4fb7-a66b-9928c483cf8a?db=5&auth=1) suggests running the System File Checker (https://support.microsoft.com/en-us/kb/929833) ("sfc /scannow" in an Admin console) to fix possibly missing system libraries; may help or not...
You can easily specify several more plugin paths for AviSynth+, also in areas not monitored by the UAC.
huhn
2nd February 2016, 14:18
worth a try thank both of you.
i will look into changing the plugin folder path later. i hope i find all needed informations.
edit:"sfc /scannow" as admin didn't find any issues
and the build in administrator didn't worked too. i don't see a reason why a different plugin folder should work when it doesn't work with the admin account.
so i'm pretty much out of ideas.
i guess time to reinstall windows next weekend.
WorBry
16th February 2016, 06:36
Hi,
I'm wanting to install L-Smash on Mint KDE 17.3 (AMD 64) and, if successful, Kubuntu 15.10 (AMD 64). I have VapourSynth installed on both from this ppa:
https://launchpad.net/~djcj/+archive/ubuntu/vapoursynth
I also installed the "Extra Plugins" package (which got installed to /usr/lib/x86_64-linux-gnu/vapoursynth), but unfortunately L-Smash was not included.
So I'm left with the prospect of trying to install it myself, with absolutely no experience in installing VapourSynth plugins, or compiling anything really. Still very new to linux.
I found earlier in the thread though a method described for installing L-Smash and L-SMASH Works on Ubuntu, so I thought I'd give it a try, on Mint first.
sudo apt-get install checkinstall
L-SMASH:
git clone git://github.com/l-smash/l-smash.git
cd l-smash
./configure
make -j$(nproc)
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
LSMASHSource:
git clone git://github.com/VFR-maniac/L-SMASH-Works.git
cd L-SMASH-Works/VapourSynth
./configure
make -j$(nproc)
sudo checkinstall --pkgname=vslsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
Following that procedure, I now have the unpacked git clone folders for l-smash and l-SMASH Works sitting in my Home directory. But when I apply ./configure I get these errors:
~/l-smash > ./configure
generating config.mak ...
error: invalid CFLAGS/LDFLAGS
~/L-SMASH-Works/VapourSynth > ./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
error: invalid CFLAGS/LDFLAGS
Not a promising start. Would appreciate advice on what to do?
TheFluff
16th February 2016, 07:36
well, you could start where configure tells you to, by checking what's in your CFLAGS and LDFLAGS (to see what's in an environment variable on a unix-based system, say echo $VARIABLENAME)
if you spent half as much time reading error messages and pasting them into google as you do posting on forums I'd wager you'd be a lot further along right now than you are
edit: nevermind, checking what's in your env CFLAGS/LDFLAGS probably won't help. I took a look at configure and it adds a bunch of stuff; you're gonna have to check config.log and see why it fails. My gut says your compiler is too old but who knows.
WorBry
16th February 2016, 08:16
if you spent half as much time reading error messages and pasting them into google as you do posting on forums I'd wager you'd be a lot further along right now than you are.
Why are you being so obnoxious. You did the same to me on that VapourSynth thread, where I ended up requesting advice on how to install to L-Smash on Linux, to which no-one responded. After exhaustive google searches to find some documentation, I returned here, and after winding my way page by page through this lengthy thread, I finally found something that looked promising. And now you've followed me here and are doing the same thing again.
well, you could start where configure tells you to, by checking what's in your CFLAGS and LDFLAGS (to see what's in an environment variable on a unix-based system, say echo $VARIABLENAME)
....edit: nevermind, checking what's in your env CFLAGS/LDFLAGS probably won't help. I took a look at configure and it adds a bunch of stuff; you're gonna have to check config.log and see why it fails. My gut says your compiler is too old but who knows.
What makes you think I even understand what you are talking about. If I did, I wouldn't be asking the questions I have been. So why pile more on, just to make me look dumb? Please stop it. In my experience, people who really know their stuff don't treat other people that way.
LigH
16th February 2016, 08:31
@ TheFluff: Blaming people for having no experience doesn't give them experience. ;)
@ WorBry: Try to skip the emotional parts and read the technical parts again; showing us the content of your "config.log" (generated during the ./configure run, an error message already here should have alerted you) may help guessing a reason. It will probably be large, so using one of the many "pastebin services" out there is recommendable.
WorBry
16th February 2016, 08:43
Thank-you. It's now well into the small hours here, so I'll come back on this tomorrow.
TheFluff
16th February 2016, 09:21
If you want to get any serious work done on Linux (other than the basic computer desktop things such as word processing, spreadsheets, web browsing and email) you gotta learn at least the very basics of compiling stuff. Blame nerds for it or whatever you want but that's just how it is, you need to learn to deal with it. The people you're currently putting your questions in this forum (which is a forum for digital video software development, not a Linux basics forum) are not the kind of people who are all that interested in writing yet another "how to compile things under Linux for complete beginners" guide just for you. Your questions are decently well formulated but the reason nobody is answering them is that they are elementary, answering them will not solve the actual problem (just help you one more step on the long way to actually finding out what the real problem is) and people can't be bothered to hold your hand through your first battles with a Linux developer environment.
If you don't want this frustration, there are two avenues available to you:
1) You can man up and go read some guides that explain what CFLAGS and LDFLAGS are (try typing "what is cflags" into Google, for example), what config.log is and why it's important (it's a standard feature in almost every configure script on the planet, it's not something unique to L-SMASH) and some basic build troubleshooting so you can at least ask the right questions, ones that don't require the respondent to begin their answer with the compiler equivalent of explaining how to copypaste text, or
2) Go back to Windows, where the hardest problem you can expect to encounter is figuring out what folder to put a .dll in.
The underlying problem here is that Linux people tend to distribute software in source form, and if you're installing software from source you kinda need to know something about compilers and build environments to solve any issues at all. You don't necessarily need to be a programmer (although it certainly helps), but again, this is just how Linux is, and you need to learn to deal with it.
What makes you think I even understand what you are talking about. If I did, I wouldn't be asking the questions I have been. So why pile more on, just to make me look dumb? Please stop it. In my experience, people who really know their stuff don't treat other people that way.
The answer I gave (look in config.log) is as much of an answer to the question you posed as anyone could hope to come up with, given the info you provided. It was not a smoke screen or an insult.
In my experience, people who really know their stuff don't treat other people that way.
have you ever read anything linus torvalds has written?
because boy howdy the open source community sure doesn't like people asking questions, ask the source code or suffer
jpsdr
16th February 2016, 09:42
No one has any idea of the issue i have, described in post #456 (http://forum.doom9.org/showpost.php?p=1752997&postcount=456) ?
TheFluff
16th February 2016, 09:54
No one has any idea of the issue i have, described in post #456 (http://forum.doom9.org/showpost.php?p=1752997&postcount=456) ?
Not really, but since it's complaining about not recognizing PRIu64 that points to either something being off with your standard includes (inttypes.h in this case) or the .c files being compiled as C89 instead of C99 or something like that (note that it's only complaining about the .c files). Can't really give you a good answer, I've never built it under Windows myself.
WorBry
16th February 2016, 16:03
If you want to get any serious work done on Linux ......
No, I don't particularly, at least not at this point. I just want to get Vapoursynth up and running with some standard routines for processing the variety of video formats I use or may encounter. That work I am serious about.
....because boy howdy the open source community sure doesn't like people asking questions, ask the source code or suffer
And by the way, that has not at all been my experience when visiting linux forums. Very welcoming and chilled. People with all levels of experience always willing to help and many people addressing the same level of newbie queries as myself. No condescension or frosty go figure it yourself because you are in the open source world now. But in this particular case (installing L-Smash for VapourSynth) I couldn't obtain the pertinent information needed and so it was logical to address it here. And yes, if I manage to get this sorted, I might in turn be able to help others struggling with the same problem. That's what the Linux community ethos is about, surely.
Now I'm asking you politely, please don't respond to any more of my posts, or weigh in on any of the replies that I may receive from others.
Thank you.
WorBry
16th February 2016, 17:01
.....read the technical parts again; showing us the content of your "config.log" (generated during the ./configure run, an error message already here should have alerted you) may help guessing a reason.
The config.log generated in the L-Smash-Works>VapourSynth folder simply states:
all command lines:
---------------------------------
CFLAGS/LDFLAGS checking...
int main(void){ return 0;}
gcc conftest.c -o conftest -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
1
I can find no config.log generated in the l-smash folder, or in any of the sub-folders, or indeed anywhere in the Home directory..hidden files included. Tried it repeatedly.
http://i.imgur.com/98ptisp.png
WorBry
16th February 2016, 18:18
OK, I've just tried again, this time in Kubuntu 15.10 (AMD 64) and have made some progress. This was using the same commands as before:
sudo apt-get install checkinstall
L-SMASH:
git clone git://github.com/l-smash/l-smash.git
cd l-smash
./configure
make -j$(nproc)
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
LSMASHSource:
git clone git://github.com/VFR-maniac/L-SMASH-Works.git
cd L-SMASH-Works/VapourSynth
./configure
make -j$(nproc)
sudo checkinstall --pkgname=vslsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
L-Smash installed OK, stating that it has been saved to
~l-smash/lsmash_1384-g3408947-1_amd64.deb
but moving on to L-Smash-Works I've again hit an obstacle at ./configure:
~/L-SMASH-Works/VapourSynth$ ./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
warning: pkg-config or pc files not found, lib detection may be inaccurate.
checking for liblsmash...
error: liblsmash checking failed
error: lsmash.h might not be installed or some libs missing.
Config.log reports:
ll command lines:
---------------------------------
CFLAGS/LDFLAGS checking...
int main(void){ return 0;}
gcc conftest.c -o conftest -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib
0
int main(void){ return 0;}
gcc conftest.c -o conftest -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib
0
int main(void){ return 0;}
gcc conftest.c -o conftest -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib
0
---------------------------------
warning: pkg-config or pc files not found, lib detection may be inaccurate.
---------------------------------
checking for liblsmash...
#include <lsmash.h>
int main(void){lsmash_create_root(); return 0;}
gcc conftest.c -o conftest -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib -llsmash -lavformat -lavcodec -lswscale -lavutil
/usr/bin/ld: cannot find -lavformat
/usr/bin/ld: cannot find -lavcodec
/usr/bin/ld: cannot find -lswscale
/usr/bin/ld: cannot find -lavutil
collect2: error: ld returned 1 exit status
1
---------------------------------
error: liblsmash checking failed
I have ffmpeg installed:
~$ ffmpeg
ffmpeg version 2.7.6-0ubuntu0.15.10.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/usr --extra-version=0ubuntu0.15.10.1 --build-suffix=-ffmpeg -enable-frei0r --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enablble-libmp3lame --enable-libopenjpeg --enable-openal --enable-libopus --enable-libpulse -webp --enable-libxvid --enable-libzvbi --enable-opengl --enable-x11grab --enable-libdc13
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 36.100 / 56. 36.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
So is it a question of pointing whatever to the right directory or something?
Groucho2004
16th February 2016, 18:54
How about some de-cluttering and moving the gcc stuff to a dedicated thread?
WorBry
16th February 2016, 19:30
Might be a good idea. And then there would be a point of reference for anyone searching for the same answers.
jones1913
16th February 2016, 20:35
@WorBry
The log file from your mint attempt points to a missing 'crt1.o'. A quick google search shows that this file is part of package 'libcX-dev'.
So first check if you have a similar package installed. On Debian/Ubuntu based distros you often need 'XXX-dev' packages to compile things.
Otherwise if crt1.o exist on your system then it could be a problem with pointer to the right path. ($LIBRARY_PATH or so...)
At your attempt with kubuntu there is a problem with 'pkg-config', google should point you to the right direction.
As a side note: here on Manjaro Linux (Arch Linux based) I was able to compile l-smashsource at the first try without installing any additional packages.
Apart from that it is not necessary because l-smash and l-smashsource are available via the AUR (Arch User Repository), so installation takes only a few clicks.
qyot27
17th February 2016, 02:55
There is no ffmpeg-dev in Debian and its derivatives that can install all of the right dev libraries. The -dev packages are separated per-library (http://packages.ubuntu.com/search?keywords=ffmpeg-dev&searchon=names&suite=wily§ion=all), so you'd probably need to do this before attempting to build L-SMASH-Works:
sudo apt-get install Package libavcodec-ffmpeg-dev libavdevice-ffmpeg-dev libavfilter-ffmpeg-dev libavformat-ffmpeg-dev libavresample-ffmpeg-dev libavutil-ffmpeg-dev libpostproc-ffmpeg-dev libswresample-ffmpeg-dev libswscale-ffmpeg-dev
Although quite honestly, I'd just build FFmpeg from git and do it that way.
WorBry
17th February 2016, 05:02
Thanks.
OK, resuming after a lengthy power cut, I've got a bit further with the L-Smash Works install on Kubuntu 15.10,but now the:
make -j$(nproc)
won't complete:
~$ git clone git://github.com/VFR-maniac/L-SMASH-Works.git
Cloning into 'L-SMASH-Works'...
remote: Counting objects: 5179, done.
remote: Total 5179 (delta 0), reused 0 (delta 0), pack-reused 5179
Receiving objects: 100% (5179/5179), 2.48 MiB | 3.64 MiB/s, done.
Resolving deltas: 100% (3258/3258), done.
Checking connectivity... done.
bryan@bryans-kubuntu:~$ cd L-SMASH-Works/VapourSynth
bryan@bryans-kubuntu:~/L-SMASH-Works/VapourSynth$ ./configure
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
CFLAGS/LDFLAGS checking...
checking for liblsmash...
checking for libavformat...
checking for libavcodec...
checking for libswscale...
settings...
CC = gcc
LD = gcc
STRIP = strip
CFLAGS = -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu
LDFLAGS = -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib -shared
LIBS = -L/usr/local/lib -llsmash -lm -lavformat-ffmpeg -lavcodec-ffmpeg -lswscale-ffmpeg -lavutil-ffmpeg
SONAME = libvslsmashsource.so.875
SOFLAGS = -Wl,-soname,libvslsmashsource.so.875
PREFIX = /usr/local
VSPLUGINDIR = ${libdir}/vapoursynth
configure finished.
type 'make' : compile libvslsmashsource.so.875
bryan@bryans-kubuntu:~/L-SMASH-Works/VapourSynth$ make -j$(nproc)
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c lsmashsource.c -o lsmashsource.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c video_output.c -o video_output.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c libavsmash_source.c -o libavsmash_source.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c lwlibav_source.c -o lwlibav_source.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/utils.c -o ../common/utils.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/qsv.c -o ../common/qsv.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/libavsmash.c -o ../common/libavsmash.o
video_output.c: In function ‘get_vs_output_pixel_format’:
video_output.c:263:13: warning: implicit declaration of function ‘strcasecmp’ [-Wimplicit-function-declaration]
if( strcasecmp( format_name, format_table[i].format_name ) == 0 )
^
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/libavsmash_video.c -o ../common/libavsmash_video.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/lwlibav_dec.c -o ../common/lwlibav_dec.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/lwlibav_video.c -o ../common/lwlibav_video.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/lwlibav_audio.c -o ../common/lwlibav_audio.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/lwindex.c -o ../common/lwindex.o
gcc -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu -c ../common/video_output.c -o ../common/video_output.o
../common/libavsmash.c: In function ‘libavsmash_get_track_by_media_type’:
../common/libavsmash.c:206:9: warning: ‘track_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if( lsmash_construct_timeline( root, track_id ) < 0 )
^
gcc -Wl,-soname,libvslsmashsource.so.875 -fPIC -L. -L/usr/local/lib -L/usr/local/lib -shared -Wl,-s -o libvslsmashsource.so.875 lsmashsource.o video_output.o libavsmash_source.o lwlibav_source.o ../common/utils.o ../common/qsv.o ../common/libavsmash.o ../common/libavsmash_video.o ../common/lwlibav_dec.o ../common/lwlibav_video.o ../common/lwlibav_audio.o ../common/lwindex.o ../common/video_output.o -L/usr/local/lib -llsmash -lm -lavformat-ffmpeg -lavcodec-ffmpeg -lswscale-ffmpeg -lavutil-ffmpeg
/usr/bin/ld: /usr/local/lib/liblsmash.a(description.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/liblsmash.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
GNUmakefile:23: recipe for target 'libvslsmashsource.so.875' failed
make: *** [libvslsmashsource.so.875] Error 1
The log says to recompile with -fPIC. Trying to find out how to do that:
http://stackoverflow.com/questions/13812185/how-to-recompile-with-fpic
Looking at the config.mak file -fPIC is already there isn't it?
CC = gcc
LD = gcc
STRIP = strip
CFLAGS = -Os -ffast-math -Wall -std=c99 -pedantic -I. -I. -fPIC -I/usr/local/include -fexcess-precision=fast -I/usr/local/include -I/usr/include/x86_64-linux-gnu
LDFLAGS = -fPIC -L. -L/usr/local/lib -L${exec_prefix}/lib -shared
LIBS = -L/usr/local/lib -llsmash -lm -lavformat-ffmpeg -lavcodec-ffmpeg -lswscale-ffmpeg -lavutil-ffmpeg
SRCDIR = .
DESTDIR =
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
vsplugindir = ${libdir}/vapoursynth
SRC_SOURCE = lsmashsource.c video_output.c libavsmash_source.c lwlibav_source.c ../common/utils.c ../common/qsv.c ../common/libavsmash.c ../common/libavsmash_video.c ../common/lwlibav_dec.c ../common/lwlibav_video.c ../common/lwlibav_audio.c ../common/lwindex.c ../common/video_output.c
BASENAME=vslsmashsource
SONAME=libvslsmashsource.so.875
SONAME_LN=libvslsmashsource.so
SOSUFFIX=so
SOFLAGS=-Wl,-soname,libvslsmashsource.so.875
TheFluff
17th February 2016, 06:21
You're asking better questions.
The issue here seems to be that you installed liblsmash as a static library (the error message says the problem appeared when trying to link /usr/local/lib/liblsmash.a - on Linux, static libraries have the .a extension while shared ones are .so) but now you're trying to link libvslsmashsource to it and that's a shared library. That won't work in this case (for reasons obscure and arcane, and I can't say I understand them myself). The top answer to the Stackoverflow question you linked actually gave you the correct solution to the problem (although it's definitely hard to figure out how to apply the solution to your problem if you don't already know the answer): you need to get rid of that liblsmash.a and recompile it as a shared library instead (or just install a shared library too, I expect the linker to be able to figure out which one to use). I dunno how you installed it though so exactly how to uninstall it is up to you to figure out - if you made it from source, "make uninstall" in the directory where you compiled it might work.
e: nvm, looks like you built it yourself. No need to uninstall it, just compile it again from the start but instead of just running ./configure, run ./configure --enable-shared
WorBry
17th February 2016, 06:56
I just followed this procedure:
sudo apt-get install checkinstall
L-SMASH:
git clone git://github.com/l-smash/l-smash.git
cd l-smash
./configure
make -j$(nproc)
sudo checkinstall --pkgname=lsmash --pkgversion="0:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --fstrans=no --default
LSMASHSource:
git clone git://github.com/VFR-maniac/L-SMASH-Works.git
cd L-SMASH-Works/VapourSynth
./configure
make -j$(nproc)
sudo checkinstall --pkgname=vslsmashsource --pkgversion="1:$(git rev-list --count HEAD)-g$(git rev-parse --short HEAD)" \
--backup=no --deldoc=yes --delspec=yes --deldesc=yes --strip=yes --stripso=yes --addso=yes --fstrans=no --default
Tried:
./configure --enable-shared
Appears not to be an option:
~/L-SMASH-Works/VapourSynth$ ./configure --enable-shared
~/L-SMASH-Works/VapourSynth ~/L-SMASH-Works/VapourSynth
~/L-SMASH-Works/VapourSynth
error: unknown option --enable-shared
~/L-SMASH-Works/VapourSynth$ ./configure --help
Usage: [PKG_CONFIG_PATH=/foo/bar/lib/pkgconfig] ./configure [options]
options:
-h, --help print help (this)
--prefix=PREFIX install architecture-independent files into PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files into EPREFIX
[PREFIX]
--libdir=DIR install libs in DIR [EPREFIX/lib]
--vs-plugindir=DIR location of VapourSynth plugin directory,
default is [libdir]/vapoursynth
--extra-cflags=XCFLAGS add XCFLAGS to CFLAGS
--extra-ldflags=XLDFLAGS add XLDFLAGS to LDFLAGS
--extra-libs=XLIBS add XLIBS to LIBS
--target-os=TARGET_OS select target operating system
--cross-prefix=PREFIX use PREFIX for compilation tools
--sysroot=SYSROOT root of cross-build tree
TheFluff
17th February 2016, 07:38
Wrong configure. The L-SMASH-Works configure doesn't have --enable-shared since you can't build it as static (would make no sense since it's a plugin). L-SMASH is the one you need to redo.
qyot27
17th February 2016, 07:45
It's L-SMASH itself that would need to be built shared, not L-SMASH-Works. The problem is that L-SMASH only uses -fPIC when building as a shared library. You have basically two options here: rebuild it as shared like TheFluff suggested, or rebuild as static but force the use of -fPIC in the CFLAGS (by appending ./configure with --extra-cflags="-fPIC"). checkinstall should be smart enough to do the general update tango so that you don't have a spare liblsmash.a without -fPIC laying around, but if you'd rather uninstall first, the command would be sudo apt-get purge lsmash.
EDIT: Beat to it. Oh well.
EDIT 2: Also, if you rebuild L-SMASH as shared, the checkinstall command would need the --stripso=yes --addso=yes options added to it.
jpsdr
17th February 2016, 09:55
Not really, but since it's complaining about not recognizing PRIu64 that points to either something being off with your standard includes (inttypes.h in this case) or the .c files being compiled as C89 instead of C99 or something like that (note that it's only complaining about the .c files). Can't really give you a good answer, I've never built it under Windows myself.
Thanks, this gives me a lead, to figure out why it was compiling under VS2013 and not anymore under VS2015.
I'll follow the C99 hint, maybe there was something set by default under VS2013 and not anymore under VS2015, or VS2015 broke something (i hope not...), but anyway, it's something i can start with.
speedyrazor
17th February 2016, 10:06
Hi, I have hit a problem opening a Quicktime Prores in Avisynth, which has 1 audio track with 10 channels of audio in it. It works with 1 track with 2 audio channels, but with this file that has 10 channels I am getting this error:
LSMASHAudioSource: failed to open resampler.
(C:\Users\me\Desktop\test.avs, line1)
Here is the avs script:
LSMASHAudioSource(source="10_ch_test.mov", track=2)
I am using 'LSMASHSource-AviSynth-plugin-r859-static-32bit'.
I will attached a small movie sample later. Is there anything i can do to get round this, is it a channel limitation?
Kind regards.
jpsdr
17th February 2016, 19:50
I've investigate a little more, issue with VS2015 is that apparently it didn't like line like this :
"Failed to find %s track %"PRIu32".\n"
The issue is not that PRIu32 is not defined, it's defined, what it didn't like is the way the line is writen.
I've not been able to find a way it didn't like for now... :(
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.