Opened 16 years ago

Closed 15 years ago

#17602 closed defect (fixed)

strigi: invalid conversion from 'const char**' to 'char**'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: clubjuggler@…
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: gui-dos (Guido Soranzio), jmroot (Joshua Root), p.maedel@…, florian.feldhaus@…
Port: strigi

Description

strigi 0.5.10 doesn't compile on Mac OS X 10.4.11 Intel:

rschmidt@seven strigi $ port install
--->  Fetching strigi
--->  Attempting to fetch strigi-0.5.10.tar.bz2 from http://internap.dl.sourceforge.net/strigi
--->  Verifying checksum(s) for strigi
--->  Extracting strigi
--->  Applying patches to strigi
--->  Configuring strigi
--->  Building strigi
Error: Target org.macports.build returned: shell command " cd "/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_strigi/work/strigi-0.5.10" && nice -n 10 make all " returned error 2
Command output: [ 10%] Building CXX object src/streams/CMakeFiles/streams.dir/tarinputstream.o
[ 11%] Building CXX object src/streams/CMakeFiles/streams.dir/textutils.o
[ 11%] Building CXX object src/streams/CMakeFiles/streams.dir/zipinputstream.o
[ 12%] Building CXX object src/streams/CMakeFiles/streams.dir/processinputstream.o
[ 12%] Building CXX object src/streams/CMakeFiles/streams.dir/strigi/compat.o
[ 13%] Building CXX object src/streams/CMakeFiles/streams.dir/strigi/fnmatch.o
[ 13%] Building CXX object src/streams/CMakeFiles/streams.dir/strigi/stgdirent.o
Linking CXX shared library libstreams.dylib
[ 13%] Built target streams
Scanning dependencies of target oletest
[ 13%] Building CXX object src/streams/CMakeFiles/oletest.dir/oletest.o
Linking CXX executable oletest
[ 13%] Built target oletest
Scanning dependencies of target testpt
[ 13%] Building CXX object src/streams/CMakeFiles/testpt.dir/testpt.o
[ 14%] Building CXX object src/streams/CMakeFiles/testpt.dir/processinputstream.o
Linking CXX executable testpt
[ 14%] Built target testpt
Scanning dependencies of target pdfstream
[ 14%] Building CXX object src/streams/pdf/CMakeFiles/pdfstream.dir/pdfparser.o
Linking CXX static library libpdfstream.a
[ 14%] Built target pdfstream
Scanning dependencies of target streamanalyzer
[ 15%] Building CXX object src/streamanalyzer/CMakeFiles/streamanalyzer.dir/analysisresult.o
/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_strigi/work/strigi-0.5.10/src/streamanalyzer/analysisresult.cpp: In member function 'int32_t Latin1Converter::_fromLatin1(char*&, const char*, size_t)':
/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_strigi/work/strigi-0.5.10/src/streamanalyzer/analysisresult.cpp:91: error: invalid conversion from 'const char**' to 'char**'
/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_strigi/work/strigi-0.5.10/src/streamanalyzer/analysisresult.cpp:91: error:   initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
make[2]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/analysisresult.o] Error 1
make[1]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/all] Error 2
make: *** [all] Error 2

Error: Status 1 encountered during processing.
$

0.5.7 had the same problem.

This looks like the age-old differing libiconv implementation error. Different versions of libiconv implement the interface differently (sometimes the same version of libiconv implements the interface differently on different platforms or in different situations). The software needs to detect which implementation is in place on the system at hand, and use that one.

Attachments (1)

Portfile-strigi.diff (824 bytes) - added by etphipp@… 15 years ago.
Patch to override paths to iconv, xml2

Download all attachments as: .zip

Change History (17)

comment:1 Changed 16 years ago by tobypeterson

It looks like it has a configure check for it, so I'm not sure why this ends up failing. I guess it could be that the configure script (well, cmake in this case) looks at /usr/include/iconv.h (which I believe is busted on Tiger), but it uses /opt/local/include/iconv.h while building...

comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

That's possible. I don't know that /usr/include/iconv.h (which is copyright 2003) is busted on Tiger, but it is a different file than /opt/local/include/iconv.h (which is copyright 2006).

comment:3 Changed 16 years ago by jmroot (Joshua Root)

Cc: jmr@… added
Resolution: fixed
Status: newclosed

I think this was due to an undeclared dependency on libxml2, which caused strigi to use the system libxml2 when the port was not installed. Libxml2 uses libiconv, and thus, disaster.

I've added this dep and a few others in r45985.

comment:4 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:5 Changed 15 years ago by p.maedel@…

Cc: p.maedel@… added

Cc Me!

comment:6 Changed 15 years ago by p.maedel@…

Having exactly the same error again with 0.6.3

Please reopen & fix

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_strigi/work/strigi-0.6.3/src/streamanalyzer/analysisresult.cpp: In member function 'int32_t Latin1Converter::_fromLatin1(char*&, const char*, size_t)':
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_strigi/work/strigi-0.6.3/src/streamanalyzer/analysisresult.cpp:91: error: invalid conversion from 'const char**' to 'char**'
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_strigi/work/strigi-0.6.3/src/streamanalyzer/analysisresult.cpp:91: error:   initializing argument 2 of 'size_t libiconv(void*, char**, size_t*, char**, size_t*)'
make[2]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/analysisresult.cpp.o] Error 1
make[1]: *** [src/streamanalyzer/CMakeFiles/streamanalyzer.dir/all] Error 2
make: *** [all] Error 2

comment:7 in reply to:  6 Changed 15 years ago by mf2k (Frank Schima)

Replying to p.maedel@…:

Having exactly the same error again with 0.6.3

wfm. Please run the following:

sudo port selfupdate
sudo port upgrade outdated
sudo port clean strigi
sudo port install strigi

If it still does not work for you, please supply the version of Mac OS X and Xcode you are running.

comment:8 Changed 15 years ago by p.maedel@…

ty, what a fast response!

pmaedel$ sudo port selfupdate

MacPorts base version 1.710 installed
Downloaded MacPorts base version 1.710

The MacPorts installation is not outdated so it was not updated
pmaedel$ sudo port upgrade outdated
Error: No ports found
pmaedel$ sudo port clean strigi
--->  Cleaning strigi

But install finishes with same error again.

OS X is v10.5.7
XCode is v3.1.3

thanks again!

comment:9 Changed 15 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: closedreopened

Do you have an older version of strigi active already? If so, try to deactivate it and then run the install.

sudo port deactivate strigi
sudo port clean strigi
sudo port install strigi

comment:10 Changed 15 years ago by p.maedel@…

No, this is a fresh install of macports. actually the complete OS X installation is only half a year old so there should not be to much obfuscation.

Error: port deactivate failed: Registry error: strigi not registered as installed & active.

comment:11 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Is libiconv installed with the universal variant, and if so, for which architectures?

comment:12 Changed 15 years ago by p.maedel@…

libiconv is not installed as universal. this is an intel machine. strange thing is, a friend was able to install strigi on the same kind of machine. so I uninstalled macports & xcode completely and tried it all over again - with the same result.

comment:13 Changed 15 years ago by etphipp@…

I am getting the same build error with 0.6.3 and believe the trouble is cmake's configure of strigi is picking up the system libiconv (which has const char as the second argument to libiconv()):

$ grep ICONV CMakeCache.txt

ICONV_INCLUDE_DIR:PATH=/Library/Frameworks/libiconv.framework/Headers ICONV_LIBRARIES:FILEPATH=/Library/Frameworks/libiconv.framework Advanced flag for variable: ICONV_INCLUDE_DIR ICONV_INCLUDE_DIR-ADVANCED:INTERNAL=1 Advanced flag for variable: ICONV_LIBRARIES ICONV_LIBRARIES-ADVANCED:INTERNAL=1 Advanced flag for variable: ICONV_SECOND_ARGUMENT_IS_CONST ICONV_SECOND_ARGUMENT_IS_CONST-ADVANCED:INTERNAL=1 Test ICONV_SECOND_ARGUMENT_IS_CONST ICONV_SECOND_ARGUMENT_IS_CONST:INTERNAL=1

However the build of strigi is trying to pull in the header from /opt/local/include (where the second argument to libiconv() is char). A solution is to override the path to libiconv in the cmake configure:

configure.args-append -DICONV_INCLUDE_DIR:PATH=/opt/local/include configure.args-append -DICONV_LIBRARIES:FILEPATH=/opt/local/lib/libiconv.dylib configure.args-append -DLIBXML2_INCLUDE_DIR:PATH=/opt/local/include/libxml2 configure.args-append -DLIBXML2_LIBRARIES:FILEPATH=/opt/local/lib/libxml2.dylib

The last two fix a similar error that crops up later regarding libxml2. With these changes, 0.6.3 now builds on my machine. A diff of the portfile is attached.

Changed 15 years ago by etphipp@…

Attachment: Portfile-strigi.diff added

Patch to override paths to iconv, xml2

comment:14 Changed 15 years ago by florian.feldhaus@…

The supplied patch solved the problem for me. As long as it's not applied, you can download the patch and apply it to /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/strigi/Portfile

comment:15 Changed 15 years ago by florian.feldhaus@…

Cc: florian.feldhaus@… added

Cc Me!

comment:16 Changed 15 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: reopenedclosed

Changed the fix to respect $prefix and applied in r55989.

Note: See TracTickets for help on using tickets.