qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

Cannot compile on OS X #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Follow the instructions
2.
3.

What is the expected output? What do you see instead?
First of all leptonica needs to run ./configure before src/make
After make lib/nodebug is empty which leads to the following error for libwebp
make: *** No rule to make target `../leptonlib-1.066/lib/nodebug/liblept.a', 
needed by `webpconv'.  Stop

What version of the product are you using? On what operating system?

OS X 10.6.4 x86_64

Please provide any additional information below.

I use MacPorts so libvpx is in /opt/local/lib and not /usr/local/lib

Original issue reported on code.google.com by charlie....@clark-consulting.eu on 1 Oct 2010 at 11:03

GoogleCodeExporter commented 8 years ago
Issue 4 has been merged into this issue.

Original comment by rab...@google.com on 3 Oct 2010 at 1:35

GoogleCodeExporter commented 8 years ago
Issue 5 has been merged into this issue.

Original comment by rab...@google.com on 3 Oct 2010 at 1:36

GoogleCodeExporter commented 8 years ago
I tried following steps and able to build webpconv:

1.) Installed 'Mac Dev Tool (XCode)'  for getting dev-dependencies like gcc, 
gnumake (make) etc.

2.) Installed libpng & libjpeg disk image files (dmg packages from 
'http://ethan.tira-thompson.org/Mac_OS_X_Ports.html' ).

3.) Installed 'yasm' tar ball (Source.tar.gz) from 
'http://www.tortall.net/projects/yasm/wiki/Download' and followed instructions 
at 'http://www.tortall.net/projects/yasm/ticket/110'.

4.) Installed libvpx (libvpx-v0.9.5.tar.gz) from 
'http://code.google.com/p/webm/downloads/list' (./configure && make && sudo 
make install).

5.) Installed 'leptonlib-1.066' & 'libwebp' from local 
'webp-leptonica-0.0.3.tar.gz' tar ball (should be OK with previous version 
'webp-leptonica-0.0.2.tar.gz' too).
      - (./configure && make && sudo make install) for leptonica & 
      - (./configure && make) for libwebp to build libwebp/src/webpconv binary.

Original comment by vik...@google.com on 10 Nov 2010 at 12:46

GoogleCodeExporter commented 8 years ago
Where is the 0.0.3 tarball? I've got all the libraries already just a slightly 
older version of libvpx which I can update if necessary.

MacPorts can be obtained from http://distfiles.macports.org/MacPorts/

Original comment by charlie....@clark-consulting.eu on 10 Nov 2010 at 6:11

GoogleCodeExporter commented 8 years ago
We are verifying 0.0.3 tar-ball, but following these steps over 0.0.2 tar ball 
should also work. We will be releasing 0.0.3 tar-ball in another day or two.

Original comment by vik...@google.com on 11 Nov 2010 at 7:42

GoogleCodeExporter commented 8 years ago
One another observation regarding building 'webpconv' binary and it's dependent 
lib 'leptonica'. I ran commands in this sequence:
cd webp/leptonlib-1.066/
./configure && make && sudo make install;
// After this step, 
cd ../libwebp/
./configure && make

Original comment by vik...@google.com on 11 Nov 2010 at 10:07

GoogleCodeExporter commented 8 years ago
After installing leptonlib-1.066, verify that you have 
'/usr/local/lib/liblept.a' and '/usr/local/include/liblept/*.h'

Original comment by vik...@google.com on 11 Nov 2010 at 10:13

GoogleCodeExporter commented 8 years ago
Note that 0.0.3 has been made available in the downloads section.
please follow these instructions (that I'll be pushing to our website next 
Monday)

1) Download MacPort for your Mac-OS version.
2.) Install MacPorts to the default target directory ‘/opt/local’.
3.) Update macports
    sudo port selfupdate
4.) Install the necessary dependencies 
    sudo port install libvpx libpng jpeg giflib
5) Download latest ‘webp-leptonica’ source tar ball and build 
'leptonlib-1.066' & 'libwebp'  on your computer
    cd webp/leptonlib-1.066/; ./configure && make && sudo make install;
    cd ../libwebp/; ./configure && make && sudo make install;
This will install ‘webpconv’ binary at path ‘/usr/local/bin/’

Original comment by rab...@google.com on 13 Nov 2010 at 6:40

GoogleCodeExporter commented 8 years ago
Hi Charlie -
Were you able to give this a try.

Original comment by vik...@google.com on 15 Nov 2010 at 12:02

GoogleCodeExporter commented 8 years ago
Tried verifying build+installation on Mac-OS version 10.5 & 10.6 and above set 
of instructions are working for us.

Original comment by vikaas.a...@gmail.com on 23 Nov 2010 at 10:37

GoogleCodeExporter commented 8 years ago
Hi Vikaas,

for some reason I wasn't notified of updates to the ticket. Nice to see you've 
been working on this. Unfortunately it's still not working for me.

I get errors building leptonica:

/usr/bin/ranlib: file: liblept.a(bmpiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(gifiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(jpegiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(pngiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(pnmiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(psio1stub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(psio2stub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(tiffio.o) has no symbols
/usr/bin/ranlib: file: liblept.a(webpiostub.o) has no symbols
/usr/bin/ranlib: file: liblept.a(zlibmemstub.o) has no symbols
ranlib liblept.a
ranlib: file: liblept.a(bmpiostub.o) has no symbols
ranlib: file: liblept.a(gifiostub.o) has no symbols
ranlib: file: liblept.a(jpegiostub.o) has no symbols
ranlib: file: liblept.a(pngiostub.o) has no symbols
ranlib: file: liblept.a(pnmiostub.o) has no symbols
ranlib: file: liblept.a(psio1stub.o) has no symbols
ranlib: file: liblept.a(psio2stub.o) has no symbols
ranlib: file: liblept.a(tiffio.o) has no symbols
ranlib: file: liblept.a(webpiostub.o) has no symbols
ranlib: file: liblept.a(zlibmemstub.o) has no symbols
make[2]: Nothing to be done for `all-am'.

Although I don't think this should matter as there a port of leptonica @ 1.66

But building lipwebp still fails:
mv -f .deps/webpimg.Tpo .deps/webpimg.Po
g++ -Werror -DPACKAGE_NAME=\"libwebp\" -DPACKAGE_TARNAME=\"libwebp\" 
-DPACKAGE_VERSION=\"0.0.4\" -DPACKAGE_STRING=\"libwebp\ 0.0.4\" 
-DPACKAGE_BUGREPORT=\"http://www.http://code.google.com/p/webp\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"libwebp\" -DVERSION=\"0.0.4\" -DHAVE_LIBVPX=1 
-DHAVE_DIRENT_H=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_STDLIB_H=1 
-DHAVE_STRING_H=1 -I. -I/usr/local/include/liblept -I/usr/local/include/liblept 
-I/opt/local/include -I/opt/local/include/liblept -Wall -O2 -g -O2 -MT 
webpconv.o -MD -MP -MF .deps/webpconv.Tpo -c -o webpconv.o webpconv.c
webpconv.c: In function ‘int main(int, char**)’:
webpconv.c:258: error: ‘pixWriteWebP’ was not declared in this scope
webpconv.c:265: error: ‘pixWriteWebPwithTargetPSNR’ was not declared in 
this scope
make[1]: *** [webpconv.o] Error 1
make: *** [all-recursive] Error 1

This is with the 0.04 source files. If we get this fixed we can add a port for 
webp to MacPorts which should simplify things for others interested.

Original comment by charlie....@clark-consulting.eu on 24 Nov 2010 at 8:20

GoogleCodeExporter commented 8 years ago
FWIW the same error occurs when trying to build webp on FreeBSD 8 from the 
port: http://www.freebsdports.info/ports/graphics/webp.html

Original comment by charlie....@clark-consulting.eu on 24 Nov 2010 at 11:13

GoogleCodeExporter commented 8 years ago
The leptonica@1.66 needs patch for webpconv and the patched version is shipped 
in the source tar ball (ver 0.0.4)

When you untar the 0.0.4 source files, do following steps:

1.) cd webp/leptonlib-1.066;

2.) sudo mkdir /usr/local/lib; // This is required as 'sudo make install' in 
next step will install liblept.a there

3.) ./configure && make clean && make && sudo make install;

4.) ls -al /usr/local/include/liblept/leptprotos.h; // Verify the date-time 
stamp of this header include file.

5.) ls -alt /usr/local/lib/liblept.a;  // Verify the date-time stamp of newly 
created liblept.a

6.) grep pixWriteWebPwithTargetPSNR /usr/local/include/liblept/leptprotos.h; // 
Verify that this patched leptonica source code (header) have the necessary 
functions required for webpconv.

7.) strings /usr/local/lib/liblept.a | grep pixWriteWebPwithTargetPSNR; // 
Verify that this patched version of liblept.a have the necessary functions 
required for webpconv

8.) cd ../libwebp;

9.)  ./configure && make clean && make && sudo make install;

10.) libwebp build command should look like:
g++ -Werror -DPACKAGE_NAME=\"libwebp\" -DPACKAGE_TARNAME=\"libwebp\" 
-DPACKAGE_VERSION=\"0.0.4\" -DPACKAGE_STRING=\"libwebp\ 0.0.4\" 
-DPACKAGE_BUGREPORT=\"http://www.http://code.google.com/p/webp\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"libwebp\" -DVERSION=\"0.0.4\" -DHAVE_LIBVPX=1 
-DHAVE_DIRENT_H=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_STDLIB_H=1 
-DHAVE_STRING_H=1 -I. -I/usr/local/include/liblept -I/usr/local/include/liblept 
-I/opt/local/include -I/opt/local/include/liblept -Wall -O2 -g -O2 -MT 
webpimg.o -MD -MP -MF .deps/webpimg.Tpo -c -o webpimg.o webpimg.c

11.) webpconv binary link command should look like:
g++ -Werror -Wall -O2 -g -O2 -L/usr/X11R6/lib -L/usr/local/lib -L/opt/local/lib 
-L/opt/local/lib/liblept -lgif -o webpconv webpimg.o webpconv.o -llept -ljpeg 
-lpng -lz -lm -lvpx -lpthread -lvpx

Original comment by vikaas.a...@gmail.com on 29 Nov 2010 at 10:22

GoogleCodeExporter commented 8 years ago
BTW, ranlib errors while building liblept.a can be ignored.
The liblept.a will not get installed to /usr/local/lib in case you haven't done 
'sudo mkdir /usr/local/lib'
In that case, the default binding might be going with 
'/opt/local/lib/liblept/liblept.a', that's coming from unpatched version 1.066 
and hence doesn't have functions required for webpconv.

Alternatively you can also try to upgrade your standard leptonca to next 
version 'http://www.leptonica.com/source/leptonlib-1.67.tar.gz'

Original comment by vikaas.a...@gmail.com on 29 Nov 2010 at 10:29

GoogleCodeExporter commented 8 years ago
Hi Vikaas,

first off can we read reopen this ticket as it is not fully resolved. Thanks 
for updating the build instructions. I've submitted a patch to the MacPorts 
version of leptonica, http://trac.macports.org/attachment/ticket/27511/, so 
that the build should get easier:

sudo port install leptonica && cd libwebp && ./configure && make clean && make 
install

Or, hopefully soon just sudo port install webp

However, there are still problems. The leptonica port installs the headers to 
/opt/local/leptonica so the makefile needs updating for this. Unfortunately I'm 
still getting an error. liblepta does exist in /opt/local/lib

-rw-r--r--  2 root  admin  2332960 30 Nov 13:14 /opt/local/lib/liblept.a

Error

Making all in src
g++ -Werror -DPACKAGE_NAME=\"libwebp\" -DPACKAGE_TARNAME=\"libwebp\" 
-DPACKAGE_VERSION=\"0.0.4\" -DPACKAGE_STRING=\"libwebp\ 0.0.4\" 
-DPACKAGE_BUGREPORT=\"http://www.http://code.google.com/p/webp\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"libwebp\" -DVERSION=\"0.0.4\" -DHAVE_LIBVPX=1 
-DHAVE_DIRENT_H=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_STDLIB_H=1 
-DHAVE_STRING_H=1 -I. -I/usr/local/include/leptonica 
-I/usr/local/include/leptonica -I/opt/local/include 
-I/opt/local/include/leptonica -Wall -O2 -g -O2 -MT webpimg.o -MD -MP -MF 
.deps/webpimg.Tpo -c -o webpimg.o webpimg.c
mv -f .deps/webpimg.Tpo .deps/webpimg.Po
g++ -Werror -DPACKAGE_NAME=\"libwebp\" -DPACKAGE_TARNAME=\"libwebp\" 
-DPACKAGE_VERSION=\"0.0.4\" -DPACKAGE_STRING=\"libwebp\ 0.0.4\" 
-DPACKAGE_BUGREPORT=\"http://www.http://code.google.com/p/webp\" 
-DPACKAGE_URL=\"\" -DPACKAGE=\"libwebp\" -DVERSION=\"0.0.4\" -DHAVE_LIBVPX=1 
-DHAVE_DIRENT_H=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_STDLIB_H=1 
-DHAVE_STRING_H=1 -I. -I/usr/local/include/leptonica 
-I/usr/local/include/leptonica -I/opt/local/include 
-I/opt/local/include/leptonica -Wall -O2 -g -O2 -MT webpconv.o -MD -MP -MF 
.deps/webpconv.Tpo -c -o webpconv.o webpconv.c
mv -f .deps/webpconv.Tpo .deps/webpconv.Po
g++ -Werror -Wall -O2 -g -O2 -L/usr/X11R6/lib -L/usr/local/lib -L/opt/local/lib 
-L/opt/local/lib/liblept -lgif -o webpconv webpimg.o webpconv.o -llept -ljpeg 
-lpng -lz -lm -lvpx -lpthread -lvpx 
ld: warning: directory '/opt/local/lib/liblept' following -L not found
make[1]: Nothing to be done for `all-am'.

Original comment by charlie....@clark-consulting.eu on 30 Nov 2010 at 1:03

GoogleCodeExporter commented 8 years ago
Port submitted to MacPorts

Original comment by charlie....@clark-consulting.eu on 30 Nov 2010 at 1:47

GoogleCodeExporter commented 8 years ago
The log says that it could not find path '/opt/local/lib/liblept'
Can you also try creating that path.

I have opened this issue.

Original comment by vikaas.a...@gmail.com on 30 Nov 2010 at 2:37

GoogleCodeExporter commented 8 years ago
Thanks for reopening the ticket.

I can't see why that should make a difference if I add that folder. After all 
it only expects /opt/local/lib/liblept.a. Of course, it represses the error. 
Compilation does work and it does install. So we probably now just need to work 
on fixing the paths.

Testing the binary I get 

 webpconv Bildschirmfoto\ 2010-09-11\ um\ 00.15.11.png 
processing Bildschirmfoto 2010-09-11 um 00.15.11.png
Output file Bildschirmfoto 2010-09-11 um 00.15.11.webp
Error in pixWriteWebPwithTargetPSNR: function not present
pixWriteWebPwithTargetPSNR Failed. See previous error messages. Turn on debug 
build if you aren't seeing enough detailed error messages

Original comment by charlie....@clark-consulting.eu on 30 Nov 2010 at 3:14

GoogleCodeExporter commented 8 years ago
Thanks for your patience. Let me see if i can reproduce this issue.
Any chance you might be using standard leptonica (ver 1.66 or 1.67) instead of 
the patched leptonica.

Can you also evaluate other issue you raise (issue 35) for FreeBSD 8

Original comment by vikaas.a...@gmail.com on 30 Nov 2010 at 4:03

GoogleCodeExporter commented 8 years ago
I'm using the leptonica 1.67 with the diff to the portfile attached to 
/opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/lepton
ica/Portfile

After that sudo port install leptonica
cd libwebp etc.

I've filed an issue for the FreeBSD port as I'm less experience with FreeBSD 
ports. Currently I think the port doesn't depend on the leptonlib port which is 
why this is still @ 1.60

Original comment by charlie....@clark-consulting.eu on 30 Nov 2010 at 4:49

Attachments:

GoogleCodeExporter commented 8 years ago
By default webp format is not supported in leptonica and hence we need to ship 
patched ver (currently 1.66) with the webp source tarball.
I can understand the pain. Can you give a try building liblept.a from the 
'webp-leptonica' source tarball that have the patched ver inside 'webp' 
directory.
We are working on removing the requirement to ship patched leptonica within 
webp tar-bundle. 

Original comment by vikaas.a...@gmail.com on 30 Nov 2010 at 5:51

GoogleCodeExporter commented 8 years ago
aagh! Sorry, I think the combined archive is a *bad* idea. Isn't it possible to 
get the webp patch into leptonica? If not best to have something like a "port" 
that patches the leptonica source rather than distributing it. I think this 
makes handling other downstream packages easier as well.

Creating the POSIX paths does let webp build and install. But I get a 
segmentation fault when I try it.

Process:         webpconv [38682]
Path:            /usr/local/bin/webpconv
Identifier:      webpconv
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [928]

Date/Time:       2010-11-30 19:02:17.685 +0100
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Interval Since Last Report:          354339 sec
Crashes Since Last Report:           10
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      F2F3E1CE-4237-4F8E-B504-330766498C0B

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib               0x00007fffffe007bf __memcpy + 31
1   libSystem.B.dylib               0x00007fffffe0121f __longcopy + 31
2   libSystem.B.dylib               0x00007fffffe0087a __memcpy + 218
3   webpconv                        0x0000000100002a8c WebPEncode + 828 
(webpimg.c:624)
4   webpconv                        0x00000001000c2814 
pixWriteWebPwithTargetPSNR + 596
5   webpconv                        0x00000001000033cd main + 1789 
(webpconv.c:265)
6   webpconv                        0x0000000100001524 start + 52

Thread 1:
0   libSystem.B.dylib               0x00007fff8351f316 semaphore_wait_trap + 10
1   webpconv                        0x00000001000ea0f9 thread_encoding_proc + 233
2   libSystem.B.dylib               0x00007fff83558536 _pthread_start + 331
3   libSystem.B.dylib               0x00007fff835583e9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0xfff876defff4af9b  rbx: 0x0000000120802f10  rcx: 0x000000000000000b  rdx: 0x000000000000002c
  rdi: 0x0000000000000014  rsi: 0x00078921000b5079  rbp: 0x00007fff5fbff4b0  rsp: 0x00007fff5fbff4b0
   r8: 0x0000000000000e03   r9: 0x0000000000000000  r10: 0x000000000000002c  r11: 0x0000000000000014
  r12: 0x00007fff5fbff790  r13: 0x00007fff5fbff780  r14: 0x000000012125c000  r15: 0x000000000000025b
  rip: 0x00007fffffe007bf  rfl: 0x0000000000010202  cr2: 0x00000001206f4000

Binary Images:
       0x100000000 -        0x10016bfff +webpconv ??? (???) <576A8E1E-9025-7CCF-119F-892A2AF1ED1E> /usr/local/bin/webpconv
       0x120478000 -        0x12047efff +libgif.4.dylib 6.6.0 (compatibility 6.0.0) <7F8E028E-79F9-B127-8BFD-911F44A1EDDF> /opt/local/lib/libgif.4.dylib
       0x120482000 -        0x1204b7ff7 +libjpeg.8.dylib 9.2.0 (compatibility 9.0.0) <055E3C7A-A428-2298-816E-79D4279DEE25> /opt/local/lib/libjpeg.8.dylib
       0x1204be000 -        0x1204dcfe7 +libpng12.0.dylib 45.0.0 (compatibility 45.0.0) <A1C8A6C1-6318-6BD7-5362-1F8509F6D1C7> /usr/X11/lib/libpng12.0.dylib
       0x1204e5000 -        0x1204f9ff7 +libz.1.dylib 1.2.5 (compatibility 1.0.0) <CED4D01F-2054-94F0-E944-962F279BC84C> /opt/local/lib/libz.1.dylib
       0x1204fd000 -        0x120502ff7 +libSM.6.dylib 7.1.0 (compatibility 7.0.0) <5FCB6F86-857D-F43C-D33F-C86C749DA9EC> /opt/local/lib/libSM.6.dylib
       0x120506000 -        0x120518fff +libICE.6.dylib 10.0.0 (compatibility 10.0.0) <8D0F911B-A066-B437-DC42-F2C7E7E2262A> /opt/local/lib/libICE.6.dylib
       0x120522000 -        0x120641fef +libX11.6.dylib 10.0.0 (compatibility 10.0.0) <DE738DF3-AD82-42F7-76F3-9CE049032C92> /opt/local/lib/libX11.6.dylib
       0x120665000 -        0x120666fff +libXau.6.dylib 7.0.0 (compatibility 7.0.0) <E93A095B-3A82-9464-2526-69AF0A59E563> /opt/local/lib/libXau.6.dylib
       0x120669000 -        0x12066cfef +libXdmcp.6.dylib 7.0.0 (compatibility 7.0.0) <7033E072-72DB-88EA-4B5F-95E7AD66FE3F> /opt/local/lib/libXdmcp.6.dylib
       0x12066f000 -        0x120683fff +libxcb.1.dylib 3.0.0 (compatibility 3.0.0) <1CF695A1-E4E4-D1C7-B59F-2080395B40E1> /opt/local/lib/libxcb.1.dylib
    0x7fff5fc00000 -     0x7fff5fc3bdef  dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld
    0x7fff80978000 -     0x7fff809f5fef  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
    0x7fff821ca000 -     0x7fff821ceff7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
    0x7fff8351e000 -     0x7fff836dffff  libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib
    0x7fff888df000 -     0x7fff888f0ff7  libz.1.dylib 1.2.3 (compatibility 1.0.0) <FB5EE53A-0534-0FFA-B2ED-486609433717> /usr/lib/libz.1.dylib
    0x7fffffe00000 -     0x7fffffe01fff  libSystem.B.dylib ??? (???) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib

Model: MacBookPro5,5, BootROM MBP55.00AC.B03, 2 processors, Intel Core 2 Duo, 
2.53 GHz, 4 GB, SMC 1.47f2
Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom 
BCM43xx 1.0 (5.10.131.36.1)
Bluetooth: Version 2.3.8f7, 2 service, 19 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: Hitachi HTS545025B9SA02, 232,89 GB
Serial ATA Device: HL-DT-ST DVDRW  GS23N
USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0x24400000
USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 
0x26500000
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0237, 
0x04600000

Original comment by charlie....@clark-consulting.eu on 30 Nov 2010 at 6:09

GoogleCodeExporter commented 8 years ago
Can you upload the image you are trying to convert (PNG to webp ?)
Can you try the same conversion on other port (BSD) as well. Also try some 
other image as well on Mac-OS as well.

Original comment by vikaas.a...@gmail.com on 1 Dec 2010 at 2:45

GoogleCodeExporter commented 8 years ago
I can confirm the segfault occurs with other images on Mac OS. No problems on 
FreeBSD. Sample file included.

Meanwhile someone has created a usable port for Mac OS (it will build and 
install at least) based on Leptonica 1.67. Depending on what you plan to do 
with the patches to leptonlib this will be the way to go: either support for 
webp goes into leptonica or a new port for leptonlib-webp is created which 
patches the leptonica sources and warns of the incompatibility to straight 
leptonica. See https://trac.macports.org/ticket/27518 for details.

How to use the port: 
# download the port and unpack it to a temporary folder
tar -xjf webp.tar.bz2
# assuming the unzipped port is in the current folder
sudo port install ./webp

This will build leptonica-1.67, if not already installed, and webpconv against 
it.
NB. any attempt to use webpconv built like this will fail because of the 
missing patches to leptonica.

Original comment by charlie....@clark-consulting.eu on 1 Dec 2010 at 9:15

Attachments:

GoogleCodeExporter commented 8 years ago
Can you try installing the next version 0.0.5.
Follow the steps mentioned in 
'http://code.google.com/p/webp/issues/detail?id=3#c13' and check if the 
'SIGSEGV' is coming on Mac-OS port.

Original comment by vikaas.a...@gmail.com on 2 Dec 2010 at 9:13

GoogleCodeExporter commented 8 years ago
webp compile error:

Undefined symbols:
  "_pixReadWebP", referenced from:
      _main in webpconv.o

Can you supply a diff for the leptonica files so that we can work we that?

Original comment by charlie....@clark-consulting.eu on 2 Dec 2010 at 9:24

GoogleCodeExporter commented 8 years ago
In case webpconv is not getting symbol 'pixReadWebP', it's linking to old 
leptonica-patch code.

I have uploaded the patch file between two source tar-balls (0.0.4 & 0.0.5).
Ensure after installing 'leptonlib-1.066' (from 0.0.5 version), that you have 
function 'pixReadWebP' defined in 'leptonlib-1.066/src/webpio.c'

Original comment by vikaas.a...@gmail.com on 2 Dec 2010 at 11:42

Attachments:

GoogleCodeExporter commented 8 years ago
You're right it was still using leptonica-1.67
I cleaned that out and was able to compile and install. Segfault still happening

Process:         webpconv [17645]
Path:            /usr/local/bin/webpconv
Identifier:      webpconv
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  bash [265]

Date/Time:       2010-12-02 12:51:14.351 +0100
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Interval Since Last Report:          70799 sec
Crashes Since Last Report:           6
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      F2F3E1CE-4237-4F8E-B504-330766498C0B

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib               0x00007fffffe007bf __memcpy + 31
1   libSystem.B.dylib               0x00007fffffe0121f __longcopy + 31
2   libSystem.B.dylib               0x00007fffffe0087a __memcpy + 218
3   webpconv                        0x0000000100002929 WebPEncode + 857 
(webpimg.c:624)
4   webpconv                        0x00000001000c2714 
pixWriteWebPwithTargetPSNR + 596
5   webpconv                        0x0000000100003297 main + 1815 
(webpconv.c:265)
6   webpconv                        0x00000001000013a4 start + 52

Thread 1:
0   libSystem.B.dylib               0x00007fff8351f316 semaphore_wait_trap + 10
1   webpconv                        0x00000001000ea0a9 thread_encoding_proc + 233
2   libSystem.B.dylib               0x00007fff83558536 _pthread_start + 331
3   libSystem.B.dylib               0x00007fff835583e9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0xfff876defff4af9b  rbx: 0x0000000000000333  rcx: 0x000000000000000b  rdx: 0x000000000000002c
  rdi: 0x0000000000000014  rsi: 0x00078921000b5079  rbp: 0x00007fff5fbff4c0  rsp: 0x00007fff5fbff4c0
   r8: 0x0000000120802f10   r9: 0x0000000000000000  r10: 0x000000000000002c  r11: 0x0000000000000014
  r12: 0x0000000000000000  r13: 0x00007fff5fbff7c0  r14: 0x00007fff5fbff7b0  r15: 0x000000012125c000
  rip: 0x00007fffffe007bf  rfl: 0x0000000000010202  cr2: 0x000000010019d000

Binary Images:
       0x100000000 -        0x10016bff7 +webpconv ??? (???) <8C2B8025-519D-0B65-438B-3A93EABD2FE7> /usr/local/bin/webpconv
       0x120478000 -        0x12047efff +libgif.4.dylib 6.6.0 (compatibility 6.0.0) <7F8E028E-79F9-B127-8BFD-911F44A1EDDF> /opt/local/lib/libgif.4.dylib
       0x120482000 -        0x1204b7ff7 +libjpeg.8.dylib 9.2.0 (compatibility 9.0.0) <055E3C7A-A428-2298-816E-79D4279DEE25> /opt/local/lib/libjpeg.8.dylib
       0x1204be000 -        0x1204dcfe7 +libpng12.0.dylib 45.0.0 (compatibility 45.0.0) <A1C8A6C1-6318-6BD7-5362-1F8509F6D1C7> /usr/X11/lib/libpng12.0.dylib
       0x1204e5000 -        0x1204f9ff7 +libz.1.dylib 1.2.5 (compatibility 1.0.0) <CED4D01F-2054-94F0-E944-962F279BC84C> /opt/local/lib/libz.1.dylib
       0x1204fd000 -        0x120502ff7 +libSM.6.dylib 7.1.0 (compatibility 7.0.0) <5FCB6F86-857D-F43C-D33F-C86C749DA9EC> /opt/local/lib/libSM.6.dylib
       0x120506000 -        0x120518fff +libICE.6.dylib 10.0.0 (compatibility 10.0.0) <8D0F911B-A066-B437-DC42-F2C7E7E2262A> /opt/local/lib/libICE.6.dylib
       0x120522000 -        0x120641fef +libX11.6.dylib 10.0.0 (compatibility 10.0.0) <DE738DF3-AD82-42F7-76F3-9CE049032C92> /opt/local/lib/libX11.6.dylib
       0x120665000 -        0x120666fff +libXau.6.dylib 7.0.0 (compatibility 7.0.0) <E93A095B-3A82-9464-2526-69AF0A59E563> /opt/local/lib/libXau.6.dylib
       0x120669000 -        0x12066cfef +libXdmcp.6.dylib 7.0.0 (compatibility 7.0.0) <7033E072-72DB-88EA-4B5F-95E7AD66FE3F> /opt/local/lib/libXdmcp.6.dylib
       0x12066f000 -        0x120683fff +libxcb.1.dylib 3.0.0 (compatibility 3.0.0) <1CF695A1-E4E4-D1C7-B59F-2080395B40E1> /opt/local/lib/libxcb.1.dylib
    0x7fff5fc00000 -     0x7fff5fc3bdef  dyld 132.1 (???) <B536F2F1-9DF1-3B6C-1C2C-9075EA219A06> /usr/lib/dyld
    0x7fff80978000 -     0x7fff809f5fef  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
    0x7fff821ca000 -     0x7fff821ceff7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
    0x7fff8351e000 -     0x7fff836dffff  libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib
    0x7fff888df000 -     0x7fff888f0ff7  libz.1.dylib 1.2.3 (compatibility 1.0.0) <FB5EE53A-0534-0FFA-B2ED-486609433717> /usr/lib/libz.1.dylib
    0x7fffffe00000 -     0x7fffffe01fff  libSystem.B.dylib ??? (???) <71E6D4C9-F945-6EC2-998C-D61AD590DAB6> /usr/lib/libSystem.B.dylib

Model: MacBookPro5,5, BootROM MBP55.00AC.B03, 2 processors, Intel Core 2 Duo, 
2.53 GHz, 4 GB, SMC 1.47f2
Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom 
BCM43xx 1.0 (5.10.131.36.1)
Bluetooth: Version 2.3.8f7, 2 service, 19 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: Hitachi HTS545025B9SA02, 232,89 GB
Serial ATA Device: HL-DT-ST DVDRW  GS23N
USB Device: Built-in iSight, 0x05ac  (Apple Inc.), 0x8507, 0x24400000
USB Device: Internal Memory Card Reader, 0x05ac  (Apple Inc.), 0x8403, 
0x26500000
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8242, 0x04500000
USB Device: Apple Internal Keyboard / Trackpad, 0x05ac  (Apple Inc.), 0x0237, 
0x04600000

Original comment by charlie....@clark-consulting.eu on 2 Dec 2010 at 11:52

GoogleCodeExporter commented 8 years ago
Vikaas, could you post the patch to leptonlib that adds support for webp?

Original comment by charlie....@clark-consulting.eu on 2 Dec 2010 at 11:57

GoogleCodeExporter commented 8 years ago
The leptonica-patch code is already distributed along with webp code in 
webp-leptonica tar ball. The patch file I created was from 'diff' result of the 
two source tars only (0.0.4 & 0.0.5).

For the SegFault issue, can you try on some more images (webpconv -format PNG 
*.png) and create a new issue for the same. I believe this bug/issue is already 
loaded with Mac-OS compile/Installation comments.

Also (if possible), can you try installing 0.0.5 source tar on some prestine 
Mac-Pro (in case you have access to another Mac-OS). I myself was not able to 
reproduce this issue (on Mac-OS ver 10.6). Will try on some other version of 
Mac-OS (prestine Mac Pro with versions 10.5 & 10.6) myself as well.

Original comment by vikaas.a...@gmail.com on 3 Dec 2010 at 3:37

GoogleCodeExporter commented 8 years ago
The segfault has been confirmed on another machine. It seems to be related to 
x86_64 as it is not raised when built for i386. However, the files created by 
the i386 build do not seem correct are not visible to the weppy plugin.

Original comment by charlie....@clark-consulting.eu on 6 Dec 2010 at 11:37

GoogleCodeExporter commented 8 years ago
Hi, with the 0.1 release the port builds fine so this ticket can be closed. The 
install can be updated to simply `sudo port install webp`

Original comment by charlie....@clark-consulting.eu on 25 Feb 2011 at 8:12

GoogleCodeExporter commented 8 years ago
Still getting segmentation faults when actually using this. No further 
information available.

Original comment by charlie....@clark-consulting.eu on 25 Feb 2011 at 10:22

GoogleCodeExporter commented 8 years ago
Sorry, ignore comment#33 that was caused by a previous build. 0.1 runs fine on 
MacOS!

Original comment by charlie....@clark-consulting.eu on 27 Feb 2011 at 12:34

GoogleCodeExporter commented 8 years ago
Great. closing this issue. feel free to reopen if need be
sudo port install webp 
works great

Original comment by rab...@google.com on 19 Mar 2011 at 6:33