2011-04-14 03:08:57     Compile espeak error. .

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-04-14 03:08:57     Compile espeak error. .

qian xin (CHINA)

Message: 99826   

 

I am using bf548-ezkit

 

I would like to use open source uclinux espake (TTS).

espake used to portaudio.

 

I downloaded the pa_stable_v19_20110326.tgz

Modified the tool chain used:  ./configure --host=bfin-linux-uclibc

Compiles is ok。

 

copy /lib and /include to bfin-uclinux/lib bfin-uclinux/include

(cp $/lib $/bfin-uclinuc/lib)

(cp $/include $/bfin-uclinux/include)

 

cd ../espeak-1.45.03-source/src

Modified Makefile:

CXX=bfin-uclinux-g++

 

And modified the use of a fork () where:

--------------------------------------------------------

error = create_pipes(p_stdin, p_stdout, p_stderr);

if (error)

    return -1;

 

mbr_pid = vfork(); //fork<->vfork

 

if (mbr_pid == -1) {

    error = errno;

    close_pipes(p_stdin, p_stdout, p_stderr);

    err("fork(): %s", strerror(error));

    return -1;

}

 

if (mbr_pid == 0) {

    int i;

 

    if (dup2(p_stdin[0], 0) == -1 ||

        dup2(p_stdout[1], 1) == -1 ||

        dup2(p_stderr[1], 2) == -1) {

        snprintf(mbr_errorbuf, sizeof(mbr_errorbuf),

                "dup2(): %s\n", strerror(errno));

        write(p_stderr[1], mbr_errorbuf, strlen(mbr_errorbuf));

        _exit(1);

    }

 

    for (i = p_stderr[1]; i > 2; i--)

        close(i);

    signal(SIGHUP, SIG_IGN);

    signal(SIGINT, SIG_IGN);

    signal(SIGQUIT, SIG_IGN);

    signal(SIGTERM, SIG_IGN);

 

    snprintf(charbuf, sizeof(charbuf), "%g", mbr_volume);

    execlp("mbrola", "mbrola", "-e", "-v", charbuf,

            voice_path, "-", "-.wav", (char *)NULL);

    /* if execution reaches this point then the exec() failed */

    snprintf(mbr_errorbuf, sizeof(mbr_errorbuf),

            "mbrola: %s\n", strerror(errno));

 

------------------------------------------------------------------------------

 

But in the compile time error:

 

In file included from wave.cpp:39:

debug.h:19:21: warning: anonymous variadic macros were introduced in C99

wave.cpp: In function ‘void update_output_parameters(int, const PaDeviceInfo*)’:

wave.cpp:467: warning: unused variable ‘aCoeff’

bfin-uclinux-g++ -O2 -DUSE_PORTAUDIO -D PATH_ESPEAK_DATA=\"/usr/share/espeak-data\" -Wall -fpic -fvisibility=hidden -pedantic

 

\

        -I. -D LIBRARY -c -fno-exceptions  debug.cpp  -o x_debug.o

In file included from debug.cpp:4:

debug.h:19:21: warning: anonymous variadic macros were introduced in C99

bfin-uclinux-g++ -O2 -DUSE_PORTAUDIO -D PATH_ESPEAK_DATA=\"/usr/share/espeak-data\" -Wall -fpic -fvisibility=hidden -pedantic

 

\

        -I. -D LIBRARY -c -fno-exceptions  klatt.cpp  -o x_klatt.o

bfin-uclinux-g++ -O2 -DUSE_PORTAUDIO -D PATH_ESPEAK_DATA=\"/usr/share/espeak-data\" -Wall -fpic -fvisibility=hidden -pedantic

 

\

        -I. -D LIBRARY -c -fno-exceptions  sonic.cpp  -o x_sonic.o

bfin-uclinux-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 x_sonic.o -lstdc++ -lportaudio -lpthread

/opt/bfin-tools2010_r4/bfin-uclinux/bin/../bfin-uclinux/runtime/usr/lib/crt1.o: In function `__start':

(.text+0x36): undefined reference to `_main'

/opt/bfin-tools2010_r4/bfin-uclinux/bin/../bfin-uclinux/runtime/usr/lib/crt1.o: In function `__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make: *** [libespeak.so] Error 1

----------------------------------------

 

I do not know how to resolve this error.

 

谢谢所有回复这个问题人。。

TranslateQuoteReplyEditDelete

 

 

2011-04-14 03:25:35     Re: Compile espeak error. .

Mike Frysinger (UNITED STATES)

Message: 99839   

 

FLAT doesnt support shared libraries.  so dont try to create them.  or use FDPIC.

QuoteReplyEditDelete

 

 

2011-04-14 04:56:41     Re: Compile espeak error. .

qian xin (CHINA)

Message: 99841   

 

 

Thank you for your help.

 

I use the static library approach. .

CXX=bfin-uclinux-g++

all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)   >>>  all: $(BIN_NAME) $(STATIC_LIB_NAME)

It's work OK..

 

or use FDPIC.  ???

Is this change?

CXX=bfin-linux-uclibc-g++

 

Compile it there are other errors. .

Attachments

    Outcomes