Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355425 - app-accessibility/espeak-1.44.05: fails while cross-compiling
Summary: app-accessibility/espeak-1.44.05: fails while cross-compiling
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: High normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 12:30 UTC by Mário Isidoro
Modified: 2011-03-16 03:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
espeak-1.44.05-fix-makefile.patch (espeak-1.44.05-fix-makefile.patch,524 bytes, patch)
2011-03-14 21:59 UTC, Christopher Brannon (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mário Isidoro 2011-02-18 12:30:28 UTC
espeak fails to cross compile. It seems to try to use the main compiler instead of the cross-compiler during the instalation phase of the build.

Reproducible: Always

Steps to Reproduce:
1. Run armv5tel-softfloat-linux-gnueabi-emerge -av app-accessibility/espeak
Actual Results:  
armv5tel-softfloat-linux-gnueabi-g++  -o speak speak.o compiledict.o dictionary.o intonation.o readclause.o setlengths.o numbers.o synth_mbrola.o synthdata.o synthesize.o translate.o mbrowrap.o tr_languages.o voices.o wavegen.o phonemelist.o klatt.o -lstdc++ -lportaudio -lpthread
armv5tel-softfloat-linux-gnueabi-g++  -shared -Wl,-soname,libespeak.so.1 -o libespeak.so \
        x_speak_lib.o x_compiledict.o x_dictionary.o x_intonation.o x_readclause.o x_setlengths.o x_numbers.o x_synth_mbrola.o x_synthdata.o x_synthesize.o x_translate.o x_mbrowrap.o x_tr_languages.o x_voices.o x_wavegen.o x_phonemelist.o x_espeak_command.o x_event.o x_fifo.o x_wave.o x_debug.o x_klatt.o -lstdc++ -lportaudio -lpthread
ar cqs libespeak.a x_speak_lib.o x_compiledict.o x_dictionary.o x_intonation.o x_readclause.o x_setlengths.o x_numbers.o x_synth_mbrola.o x_synthdata.o x_synthesize.o x_translate.o x_mbrowrap.o x_tr_languages.o x_voices.o x_wavegen.o x_phonemelist.o x_espeak_command.o x_event.o x_fifo.o x_wave.o x_debug.o x_klatt.o
armv5tel-softfloat-linux-gnueabi-g++  -o espeak espeak.o -lstdc++ -L . -lespeak
mv libespeak.so libespeak.so.1.1.44
 * Fixing byte order of phoneme data files
gcc -O2 -pipe -g -Wall -o espeak-phoneme-data espeak-phoneme-data.c
espeak-phoneme-data.c: In function 'swap_phondata':
espeak-phoneme-data.c:236: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:252: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:272: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:277: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:288: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:299: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:319: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:327: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:335: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c: In function 'swap_phonindex':
espeak-phoneme-data.c:366: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:376: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c: In function 'swap_phontab':
espeak-phoneme-data.c:403: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:411: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:416: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
espeak-phoneme-data.c:427: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
Host seems to be little-endian ..
Processing phondata ..
Processing phontab ..
Processing phonindex ..
Done.
>>> Source compiled.
>>> Test phase [not enabled]: app-accessibility/espeak-1.44.05

>>> Install espeak-1.44.05 into /var/tmp/portage/app-accessibility/espeak-1.44.05/image/ category app-accessibility
g++  -shared -Wl,-soname,libespeak.so.1 -o libespeak.so \
        x_speak_lib.o x_compiledict.o x_dictionary.o x_intonation.o x_readclause.o x_setlengths.o x_numbers.o x_synth_mbrola.o x_synthdata.o x_synthesize.o x_translate.o x_mbrowrap.o x_tr_languages.o x_voices.o x_wavegen.o x_phonemelist.o x_espeak_command.o x_event.o x_fifo.o x_wave.o x_debug.o x_klatt.o -lstdc++ -lportaudio -lpthread
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../../i686-pc-linux-gnu/bin/ld: x_speak_lib.o: Relocations in generic ELF (EM: 40)
x_speak_lib.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [libespeak.so] Error 1
 * ERROR: app-accessibility/espeak-1.44.05 failed:
 *   Installation failed
 *
 * Call stack:
 *     ebuild.sh, line  56:  Called src_install
 *   environment, line 2328:  Called die
 * The specific snippet of code:
 *       make DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="\$(PREFIX)/$(get_libdir)" AUDIO="$(get_audio)" install || die "Installation failed";
 *
 * If you need support, post the output of 'emerge --info =app-accessibility/espeak-1.44.05',
 * the complete build log and the output of 'emerge -pqv =app-accessibility/espeak-1.44.05'.
 * This ebuild is from an overlay named 'local armv5tel-softfloat-linux-gnueabi overlay': '/usr/armv5tel-softfloat-linux-gnueabi/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/app-accessibility/espeak-1.44.05/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-accessibility/espeak-1.44.05/temp/environment'.
 * S: '/var/tmp/portage/app-accessibility/espeak-1.44.05/work/espeak-1.44.05-source'



Making this small change seems to solve the problem

--- espeak-1.44.05.ebuild       2011-02-18 10:56:40.000000000 +0000
+++ espeak-9999.ebuild  2011-02-18 12:28:13.000000000 +0000
@@ -63,8 +63,8 @@

 src_install() {
        cd src
-       make DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="\$(PREFIX)/$(get_libdir)" AUDIO="$(get_audio)" install || die "Installation failed"
-
+       make DESTDIR="${D}" PREFIX="${EPREFIX}/usr" LIBDIR="\$(PREFIX)/$(get_libdir)" AUDIO="$(get_audio)" \
+       CXX="$(tc-getCXX)" CXXFLAGS="${CXXFLAGS}" install || die "Installation failed"
        cd ..
        insinto /usr/share/espeak-data
        doins -r dictsource
Comment 1 Wormo (RETIRED) gentoo-dev 2011-02-18 20:32:45 UTC
Thanks for submitting your cross-compile fix! Assigning to our espeak maintainers.
Comment 2 Christopher Brannon (RETIRED) gentoo-dev 2011-03-14 21:57:35 UTC
Actually, the makefile is slightly inefficient.
It is building libespeak.so twice: once in the build phase, and once
in the compile phase.
The action of the all: rule renames libespeak.so.
It isn't available under that name when we run make install.
A simple fix is to convert the move into a copy.
See attached.
Perhaps someone else could do better with this makefile.
Comment 3 Christopher Brannon (RETIRED) gentoo-dev 2011-03-14 21:59:01 UTC
Created attachment 265877 [details, diff]
espeak-1.44.05-fix-makefile.patch

Fix for an inefficiency in the makefile.
Comment 4 William Hubbs gentoo-dev 2011-03-16 03:43:12 UTC
This is fixed in 1.45.01.
I did not use your patch however, because the issue was with the name of the shared library and the symbolic links not being set up correctly.

Thanks for the report.