Closed philclifford closed 8 years ago
I get exactly the same error but on debian jessie
me too - it does not compile with gcc-5. for me it compiles with gcc-4.8 or gcc-4.9, but then it bails out at src/lepton/idct.cc: error "SSE4.1 instruction set not enabled"
compilation succeeds with:
CC=gcc-4.9 CXX=g++-4.9 CXXFLAGS=-msse4.1 ./configure
-march=native should supply the right -msse4.1 items, no?
How does your build command of idct.cc look like: can you paste the command line
also cat /proc/cpuinfo please :-)
g++ -DHAVE_CONFIG_H -I. -std=c++11 -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -fno-exceptions -fno-rtti -march=native -DNDEBUG -DGIT_REVISION=\"fc5a5a0\" -I./dependencies/xz/src/liblzma/api -I./src/vp8/util -I./src/vp8/model -I./src/vp8/decoder -I./src/vp8/encoder -I./dependencies -I./dependencies -I./dependencies/xz/src/liblzma/common -I./dependencies/xz/src/common -I./dependencies/xz/src/liblzma/lzma -I./dependencies/xz/src/liblzma/lz -I./dependencies/xz/src/liblzma/check -I./dependencies/xz/src/liblzma/rangecoder -I./dependencies/xz/src/liblzma/api -I./dependencies/xz/src/liblzma/simple -I./dependencies/xz/src/liblzma/delta -I./dependencies/xz/src/liblzma -g -O2 -MT src/lepton/idct.o -MD -MP -MF $depbase.Tpo -c -o src/lepton/idct.o src/lepton/idct.cc
can you run
gcc -march=native -Q --help=target
The Ubuntu 15.04 output from running: gcc -march=native -Q --help=target
The following options are target specific:
-m128bit-long-double [disabled]
-m16 [disabled]
-m32 [disabled]
-m3dnow [disabled]
-m3dnowa [disabled]
-m64 [enabled]
-m80387 [enabled]
-m8bit-idiv [disabled]
-m96bit-long-double [enabled]
-mabi= sysv
-mabm [enabled]
-maccumulate-outgoing-args [disabled]
-maddress-mode= short
-madx [disabled]
-maes [enabled]
-malign-double [disabled]
-malign-functions= 0
-malign-jumps= 0
-malign-loops= 0
-malign-stringops [enabled]
-mandroid [disabled]
-march= haswell
-masm= att
-mavx [enabled]
-mavx2 [enabled]
-mavx256-split-unaligned-load [disabled]
-mavx256-split-unaligned-store [disabled]
-mavx512cd [disabled]
-mavx512er [disabled]
-mavx512f [disabled]
-mavx512pf [disabled]
-mbionic [disabled]
-mbmi [enabled]
-mbmi2 [enabled]
-mbranch-cost= 0
-mcld [disabled]
-mcmodel= 32
-mcpu=
-mcrc32 [disabled]
-mcx16 [enabled]
-mdispatch-scheduler [disabled]
-mdump-tune-features [disabled]
-mf16c [enabled]
-mfancy-math-387 [enabled]
-mfentry [enabled]
-mfma [enabled]
-mfma4 [disabled]
-mforce-drap [disabled]
-mfp-ret-in-387 [enabled]
-mfpmath= 387
-mfsgsbase [enabled]
-mfused-madd
-mfxsr [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mhle [disabled]
-mieee-fp [enabled]
-mincoming-stack-boundary= 0
-minline-all-stringops [disabled]
-minline-stringops-dynamically [disabled]
-mintel-syntax
-mlarge-data-threshold= 0x10000
-mlong-double-128 [disabled]
-mlong-double-64 [disabled]
-mlong-double-80 [enabled]
-mlwp [disabled]
-mlzcnt [enabled]
-mmemcpy-strategy=
-mmemset-strategy=
-mmmx [enabled]
-mmovbe [enabled]
-mms-bitfields [disabled]
-mno-align-stringops [disabled]
-mno-default [disabled]
-mno-fancy-math-387 [disabled]
-mno-push-args [disabled]
-mno-red-zone [disabled]
-mno-sse4 [disabled]
-momit-leaf-frame-pointer [disabled]
-mpc32 [disabled]
-mpc64 [disabled]
-mpc80 [disabled]
-mpclmul [enabled]
-mpopcnt [enabled]
-mprefer-avx128 [disabled]
-mpreferred-stack-boundary= 0
-mprefetchwt1 [disabled]
-mprfchw [disabled]
-mpush-args [enabled]
-mrdrnd [enabled]
-mrdseed [disabled]
-mrecip [disabled]
-mrecip=
-mred-zone [enabled]
-mregparm= 0
-mrtd [disabled]
-mrtm [disabled]
-msahf [enabled]
-msha [disabled]
-msoft-float [disabled]
-msse [enabled]
-msse2 [enabled]
-msse2avx [disabled]
-msse3 [enabled]
-msse4 [enabled]
-msse4.1 [enabled]
-msse4.2 [enabled]
-msse4a [disabled]
-msse5
-msseregparm [disabled]
-mssse3 [enabled]
-mstack-arg-probe [disabled]
-mstack-protector-guard= tls
-mstackrealign [enabled]
-mstringop-strategy= [default]
-mtbm [disabled]
-mtls-dialect= gnu
-mtls-direct-seg-refs [enabled]
-mtune-ctrl=
-mtune= haswell
-muclibc [disabled]
-mveclibabi= [default]
-mvect8-ret-in-mem [disabled]
-mvzeroupper [disabled]
-mx32 [disabled]
-mxop [disabled]
-mxsave [enabled]
-mxsaveopt [enabled]
Known assembler dialects (for use with the -masm-dialect= option): att intel
Known ABIs (for use with the -mabi= option): ms sysv
Known code models (for use with the -mcmodel= option): 32 kernel large medium small
Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387
Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml
Known address mode (for use with the -maddress-mode= option): long short
Known stack protector guard (for use with the -mstack-protector-guard= option): global tls
Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop
Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2
Can you try pulling the latest and building with both configure cmake and seeing what happens? mkdir build cd build cmake .. -DCMAKE_BUILD_TYPE=Release make
That worked! I'm in image compression heaven now! ...If only I could get this compression onto my Canon 6d I could take 20% more photos on my memory card.
lepton v1.0-08c52d9280df3d409d9246df7ff166dd94628730 15326692 bytes needed to decompress this file 4661511 5859656 79.55% 16781780 bytes needed to decompress this file 4661511 5859656 79.55% lepton v1.0-08c52d9280df3d409d9246df7ff166dd94628730 16781780 bytes needed to decompress this file 4661511 5859656 79.55% no differences
Thanks: before I close: which idea worked? Did you try the latest code with both ./configure and cmake or just cmake? Do all combinations work?
Glad to assist. Here were my steps on Ubuntu 15.04: (I needed to install cmake by running: sudo apt-get install cmake
)
git clone https://github.com/dropbox/lepton.git
cd lepton
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
Then to test from the build directory ( /lepton/build: )
./lepton original.jpg compressed.lep && ./lepton compressed.lep restored_original.jpg && diff restored_original.jpg original.jpg && echo no differences
Nice: thanks!
Could you try sh autogen.sh && ./configure && make -j4 and paste the full log if it fails?
That seemed to work as well, ./lepton commands are now running from the lepton directory as opposed to the /lepton/build directory.
I had a few questions/comments if you have a second:
1) Can the .lep files be decompressed in javascript (client side)? 2) Can this compression be applied to video? 3) I imagine that this was created because a large portion of Dropbox's stored files are jpegs. (Default format for most smartphones and digital cameras). It would be nice to know the motivation behind this compression.
Thank you.
1) not yet--we'd have to translate the SSE intrinsics into javascript vector instructions ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/SIMD_types ) 2) there's actually a similar project to this one specifically for video: https://github.com/dropbox/avrecode it has a ways to go, but some of the forks are starting to get a bit of compression 3) You can read more about our motivations when we started this thing about a year ago http://www.fastcompany.com/3050180/tech-forecast/these-engineers-just-built-their-own-pied-piper-compression-algorithm
@danielrh:
command line is:
g++ -DHAVE_CONFIG_H -I. -std=c++11 -DDEFAULT_ALLOW_PROGRESSIVE -DALLOW_3_OR_4_SCALING_FACTOR -DALLOW_FOUR_COLORS -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -fno-exceptions -fno-rtti -march=native -DNDEBUG -DGIT_REVISION=\"acfb6ae\" -I./dependencies/xz/src/liblzma/api -I./src/vp8/util -I./src/vp8/model -I./src/vp8/decoder -I./src/vp8/encoder -I./dependencies -I./dependencies -I./dependencies/xz/src/liblzma/common -I./dependencies/xz/src/common -I./dependencies/xz/src/liblzma/lzma -I./dependencies/xz/src/liblzma/lz -I./dependencies/xz/src/liblzma/check -I./dependencies/xz/src/liblzma/rangecoder -I./dependencies/xz/src/liblzma/api -I./dependencies/xz/src/liblzma/simple -I./dependencies/xz/src/liblzma/delta -I./dependencies/xz/src/liblzma -g -O2 -MT src/lepton/idct.o -MD -MP -MF $depbase.Tpo -c -o src/lepton/idct.o src/lepton/idct.cc &&\ mv -f $depbase.Tpo $depbase.Po
cat /proc/cpuinfo gives: `processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 6 model name : AMD Athlon(tm) II X2 250 Processor stepping : 3 microcode : 0x10000c8 cpu MHz : 800.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid eagerfpu pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save bugs : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs bogomips : 5999.94 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate
processor : 1 vendor_id : AuthenticAMD cpu family : 16 model : 6 model name : AMD Athlon(tm) II X2 250 Processor stepping : 3 microcode : 0x10000c8 cpu MHz : 800.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid eagerfpu pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save bugs : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs bogomips : 6000.02 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate`
and finally, gcc -march=native -Q --help=target results in:
`The following options are target specific:
-m128bit-long-double [disabled]
-m16 [disabled]
-m32 [disabled]
-m3dnow [enabled]
-m3dnowa [disabled]
-m64 [enabled]
-m80387 [enabled]
-m8bit-idiv [disabled]
-m96bit-long-double [enabled]
-mabi= sysv
-mabm [enabled]
-maccumulate-outgoing-args [disabled]
-maddress-mode= short
-madx [disabled]
-maes [disabled]
-malign-data= compat
-malign-double [disabled]
-malign-functions= 0
-malign-jumps= 0
-malign-loops= 0
-malign-stringops [enabled]
-mandroid [disabled]
-march= amdfam10
-masm= att
-mavx [disabled]
-mavx2 [disabled]
-mavx256-split-unaligned-load [disabled]
-mavx256-split-unaligned-store [disabled]
-mavx512bw [disabled]
-mavx512cd [disabled]
-mavx512dq [disabled]
-mavx512er [disabled]
-mavx512f [disabled]
-mavx512ifma [disabled]
-mavx512pf [disabled]
-mavx512vbmi [disabled]
-mavx512vl [disabled]
-mbionic [disabled]
-mbmi [disabled]
-mbmi2 [disabled]
-mbranch-cost= 0
-mcld [disabled]
-mclflushopt [disabled]
-mclwb [disabled]
-mcmodel= 32
-mcpu=
-mcrc32 [disabled]
-mcx16 [enabled]
-mdispatch-scheduler [disabled]
-mdump-tune-features [disabled]
-mf16c [disabled]
-mfancy-math-387 [enabled]
-mfentry [enabled]
-mfma [disabled]
-mfma4 [disabled]
-mforce-drap [disabled]
-mfp-ret-in-387 [enabled]
-mfpmath= 387
-mfsgsbase [disabled]
-mfused-madd
-mfxsr [enabled]
-mglibc [enabled]
-mhard-float [enabled]
-mhle [disabled]
-mieee-fp [enabled]
-mincoming-stack-boundary= 0
-minline-all-stringops [disabled]
-minline-stringops-dynamically [disabled]
-mintel-syntax
-mlarge-data-threshold= 0x10000
-mlong-double-128 [disabled]
-mlong-double-64 [disabled]
-mlong-double-80 [enabled]
-mlwp [disabled]
-mlzcnt [enabled]
-mmemcpy-strategy=
-mmemset-strategy=
-mmmx [enabled]
-mmovbe [disabled]
-mmpx [disabled]
-mms-bitfields [disabled]
-mmwaitx [disabled]
-mno-align-stringops [disabled]
-mno-default [disabled]
-mno-fancy-math-387 [disabled]
-mno-push-args [disabled]
-mno-red-zone [disabled]
-mno-sse4 [enabled]
-mnop-mcount [disabled]
-momit-leaf-frame-pointer [disabled]
-mpc32 [disabled]
-mpc64 [disabled]
-mpc80 [disabled]
-mpclmul [disabled]
-mpcommit [disabled]
-mpopcnt [enabled]
-mprefer-avx128 [disabled]
-mpreferred-stack-boundary= 0
-mprefetchwt1 [disabled]
-mprfchw [enabled]
-mpush-args [enabled]
-mrdrnd [disabled]
-mrdseed [disabled]
-mrecip [disabled]
-mrecip=
-mrecord-mcount [disabled]
-mred-zone [enabled]
-mregparm= 0
-mrtd [disabled]
-mrtm [disabled]
-msahf [enabled]
-msha [disabled]
-mskip-rax-setup [disabled]
-msoft-float [disabled]
-msse [enabled]
-msse2 [enabled]
-msse2avx [disabled]
-msse3 [enabled]
-msse4 [disabled]
-msse4.1 [disabled]
-msse4.2 [disabled]
-msse4a [enabled]
-msse5
-msseregparm [disabled]
-mssse3 [disabled]
-mstack-arg-probe [disabled]
-mstack-protector-guard= tls
-mstackrealign [enabled]
-mstringop-strategy= [default]
-mtbm [disabled]
-mtls-dialect= gnu
-mtls-direct-seg-refs [enabled]
-mtune-ctrl=
-mtune= amdfam10
-muclibc [disabled]
-mveclibabi= [default]
-mvect8-ret-in-mem [disabled]
-mvzeroupper [disabled]
-mx32 [disabled]
-mxop [disabled]
-mxsave [disabled]
-mxsavec [disabled]
-mxsaveopt [disabled]
-mxsaves [disabled]
Known assembler dialects (for use with the -masm-dialect= option): att intel
Known ABIs (for use with the -mabi= option): ms sysv
Known code models (for use with the -mcmodel= option): 32 kernel large medium small
Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387
Known data alignment choices (for use with the -malign-data= option): abi cacheline compat
Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml
Known address mode (for use with the -maddress-mode= option): long short
Known stack protector guard (for use with the -mstack-protector-guard= option): global tls
Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop
Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2`
if this is still of interest, as you already closed the issue ...
I still get some errors. if i build lepton with cmake the built process is ok, but if i test it: ./lepton test.jpg test.png I get the following error
what(): Enable multithreading to use std::thread: Operation not permitted
If i try to build it with: sh autogen.sh && ./configure && make -j4 I get the following error
configure.ac:72: installing './compile' configure.ac:6: installing './install-sh' configure.ac:6: installing './missing' Makefile.am: installing './depcomp' parallel-tests: installing './test-driver' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for ranlib... ranlib checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands (CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/lepton/missing autoheader) rm -f stamp-h1 touch config.h.in cd . && /bin/bash ./config.status config.h config.status: creating config.h config.status: config.h is unchanged make all-am make[1]: Verzeichnis »/home/lepton« wird betreten depbase=
echo test_suite/test_invariants.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ g++ -DHAVE_CONFIG_H -I. -std=c++11 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -fno-exceptions -fno-rtti -march=native -DNDEBUG -DGIT_REVISION=\"1.2.1\" -I./dependencies/xz/src/liblzma/api -I./src/vp8/util -I./src/vp8/model -I./src/vp8/decoder -I./src/vp8/encoder -I./dependencies -I./dependencies -I./dependencies/xz/src/liblzma/common -I./dependencies/xz/src/common -I./dependencies/xz/src/liblzma/lzma -I./dependencies/xz/src/liblzma/lz -I./dependencies/xz/src/liblzma/check -I./dependencies/xz/src/liblzma/rangecoder -I./dependencies/xz/src/liblzma/api -I./dependencies/xz/src/liblzma/simple -I./dependencies/xz/src/liblzma/delta -I./dependencies/xz/src/liblzma -g -O2 -MT test_suite/test_invariants.o -MD -MP -MF $depbase.Tpo -c -o test_suite/test_invariants.o test_suite/test_invariants.cc &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/inflate.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/inflate.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/inflate.o dependencies/zlib/inflate.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/infback.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/infback.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/infback.o dependencies/zlib/infback.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/trees.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/trees.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/trees.o dependencies/zlib/trees.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/adler32.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/adler32.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/adler32.o dependencies/zlib/adler32.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/gzclose.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/gzclose.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/gzclose.o dependencies/zlib/gzclose.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/compress.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/compress.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/compress.o dependencies/zlib/compress.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/crc32.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/crc32.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/crc32.o dependencies/zlib/crc32.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/inftrees.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/inftrees.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/inftrees.o dependencies/zlib/inftrees.c &&\ mv -f $depbase.Tpo $depbase.Po In file included from test_suite/test_invariants.cc:5:0: test_suite/../src/vp8/model/numeric.hh: In function ‘m128i divide16bit_vec_signed(m128i)’: test_suite/../src/vp8/model/numeric.hh:294:40: error: there are no arguments to ‘_mm_abs_epi32’ that depend on a template parameter, so a declaration of ‘_mm_abs_epi32’ must be available [-fpermissive] m128i abs_num = _mm_abs_epi32(num); ^ test_suite/../src/vp8/model/numeric.hh:294:40: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) test_suite/../src/vp8/model/numeric.hh:299:38: error: there are no arguments to ‘_mm_sign_epi32’ that depend on a template parameter, so a declaration of ‘_mm_sign_epi32’ must be available [-fpermissive] return _mm_sign_epi32(retval, num); ^ depbase=echo dependencies/zlib/zutil.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/zutil.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/zutil.o dependencies/zlib/zutil.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/gzwrite.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/gzwrite.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/gzwrite.o dependencies/zlib/gzwrite.c &&\ mv -f $depbase.Tpo $depbase.Po depbase=echo dependencies/zlib/deflate.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/deflate.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/deflate.o dependencies/zlib/deflate.c &&\ mv -f $depbase.Tpo $depbase.Po test_suite/../src/vp8/model/numeric.hh: In instantiation of ‘m128i divide16bit_vec_signed(m128i) [with short unsigned int denom = 5u; m128i = vector(2) long long int]’: test_suite/test_invariants.cc:401:110: required from here test_suite/../src/vp8/model/numeric.hh:294:40: error: ‘_mm_abs_epi32’ was not declared in this scope __m128i abs_num = _mm_abs_epi32(num); ^ test_suite/../src/vp8/model/numeric.hh:299:38: error: ‘_mm_sign_epi32’ was not declared in this scope return _mm_sign_epi32(retval, num); ^ dependencies/zlib/gzwrite.c: In function ‘gz_comp’: dependencies/zlib/gzwrite.c:84:9: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration] got = write(state->fd, strm->next_in, strm->avail_in); ^ depbase=echo dependencies/zlib/inffast.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
;\ gcc -DHAVE_CONFIG_H -I. -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native -DNDEBUG -g -O2 -MT dependencies/zlib/inffast.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/inffast.o dependencies/zlib/inffast.c &&\ mv -f $depbase.Tpo $depbase.Po dependencies/zlib/gzwrite.c: In function ‘gzclose_w’: dependencies/zlib/gzwrite.c:573:5: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration] if (close(state->fd) == -1) ^ test_suite/../src/vp8/model/numeric.hh: In function ‘m128i divide16bit_vec_signed(m128i) [with short unsigned int denom = 5u; m128i = __vector(2) long long int]’: test_suite/../src/vp8/model/numeric.hh:300:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make[1]: * [test_suite/test_invariants.o] Fehler 1 make[1]: * Auf noch nicht beendete Prozesse wird gewartet … make[1]: Verzeichnis »/home/lepton« wird verlassen make: *\ [all] Fehler 2
I also attached the output of "gcc -march=native -Q --help=target"
The following options are target specific: -m128bit-long-double [disabled] -m32 [disabled] -m3dnow [disabled] -m3dnowa [disabled] -m64 [enabled] -m80387 [enabled] -m8bit-idiv [disabled] -m96bit-long-double [enabled] -mabi= sysv -mabm [enabled] -maccumulate-outgoing-args [disabled] -maddress-mode= short -madx [disabled] -maes [disabled] -malign-double [disabled] -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mandroid [disabled] -march= amdfam10 -masm= att -mavx [disabled] -mavx2 [disabled] -mavx256-split-unaligned-load [disabled] -mavx256-split-unaligned-store [disabled] -mbionic [disabled] -mbmi [disabled] -mbmi2 [disabled] -mbranch-cost= 0 -mcld [disabled] -mcmodel= 32 -mcpu=
-mcrc32 [disabled] -mcx16 [enabled] -mdispatch-scheduler [disabled] -mf16c [disabled] -mfancy-math-387 [enabled] -mfentry [enabled] -mfma [disabled] -mfma4 [disabled] -mforce-drap [disabled] -mfp-ret-in-387 [enabled] -mfpmath= 387 -mfsgsbase [disabled] -mfused-madd
-mfxsr [enabled] -mglibc [enabled] -mhard-float [enabled] -mhle [disabled] -mieee-fp [enabled] -mincoming-stack-boundary= 0 -minline-all-stringops [disabled] -minline-stringops-dynamically [disabled] -mintel-syntax
-mlarge-data-threshold= 0x10000 -mlong-double-64 [disabled] -mlong-double-80 [enabled] -mlwp [disabled] -mlzcnt [enabled] -mmmx [disabled] -mmovbe [disabled] -mms-bitfields [disabled] -mno-align-stringops [disabled] -mno-fancy-math-387 [disabled] -mno-push-args [disabled] -mno-red-zone [disabled] -mno-sse4 [enabled] -momit-leaf-frame-pointer [disabled] -mpc32 [disabled] -mpc64 [disabled] -mpc80 [disabled] -mpclmul [disabled] -mpopcnt [enabled] -mprefer-avx128 [disabled] -mpreferred-stack-boundary= 0 -mprfchw [enabled] -mpush-args [enabled] -mrdrnd [disabled] -mrdseed [disabled] -mrecip [disabled] -mrecip=
-mred-zone [enabled] -mregparm= 0 -mrtd [disabled] -mrtm [disabled] -msahf [enabled] -msoft-float [disabled] -msse [disabled] -msse2 [disabled] -msse2avx [disabled] -msse3 [disabled] -msse4 [disabled] -msse4.1 [disabled] -msse4.2 [disabled] -msse4a [disabled] -msse5
-msseregparm [disabled] -mssse3 [disabled] -mstack-arg-probe [disabled] -mstackrealign [enabled] -mstringop-strategy= [default] -mtbm [disabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune= amdfam10 -muclibc [disabled] -mveclibabi= [default] -mvect8-ret-in-mem [disabled] -mvzeroupper [disabled] -mx32 [disabled] -mxop [disabled] -mxsave [disabled] -mxsaveopt [disabled]
Known assembler dialects (for use with the -masm-dialect= option): att intel
Known ABIs (for use with the -mabi= option): ms sysv
Known code models (for use with the -mcmodel= option): 32 kernel large medium small
Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387
Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml
Known address mode (for use with the -maddress-mode= option): long short
Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop
Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2
According to http://stackoverflow.com/questions/17274032/c-threads-stdsystem-error-operation-not-permitted it's missing -pthread in both compile and link flags... can you try adding it into the cmake file?
It didn't seems to work, or maybe i did something wrong. i updated the CXX_FLAGS like this:
CXX_FLAGS = -std=c++11 -pthread
hmm... I can't quite remember how to get that all the way into the heart of CMake
maybe you can do ccmake .. then add the pthread to both the CXXFLAGS the CFLAGS and the LDFLAGS in that menu.... it's an interactive menu...and if it's there it should get put in the right place for the build
do a make VERBOSE=1 to get a verbose output from cmake to see if it really dumped the commands in there or not
Sorry to annoying you, but its still not working. I attached the output of the make VERBOSE=1 command output.txt
I don't see -pthread anywhere in the logs... we probably have to add it to the CMakeLists.txt file
I tried building this on a vanilla 16.04 box and everything worked fine.
Do you have any custom settings?
Sorry for the late reply. Normaly i don't have any custom settings. I will also try to built it on a plain 16.04 tomorrow.
Its working now. Thanks for all your efforts
make says :
In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/smmintrin.h:32:0, from src/lepton/idct.cc:3: /usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h: In function ‘m128i epi32l_to_epi16(m128i)’: /usr/lib/gcc/x86_64-linux-gnu/5/include/tmmintrin.h:136:1: error: inlining failed in call to always_inline ‘m128i _mm_shuffle_epi8(m128i, m128i)’: target specific option mismatch _mm_shuffle_epi8 (m128i X, m128i __Y) ^ src/lepton/idct.cc:168:89: error: called from here 0xd, 0xc, 0x9, 0x8, 0x5, 0x4, 0x1, 0x0));