[MPlayer-users] MPlayer-0.90pre6 compilation problems

Gansser, Martin MGansser at rand.de
Wed Aug 7 15:50:02 CEST 2002


> -----Original Message-----
> From: Gábor Lénárt [mailto:lgb at lgb.hu]
> Sent: Wednesday, August 07, 2002 2:26 PM
> To: mplayer-users at mplayerhq.hu
> Subject: Re: [MPlayer-users] MPlayer-0.90pre6 compilation problems
> 
> 
> [Automatic answer: RTFM (read DOCS, FAQ), also read 
> DOCS/bugreports.html]
> On Wed, Aug 07, 2002 at 01:51:10PM +0200, Gansser, Martin wrote:
> > collect2: ld returned 1 exit status
> > gmake: *** [mplayer] Error 1
> > 
> > prounix_root:/users/mgansser/GNU/MPlayer-0.90pre6 #
> > 
> > any help ?
> 
> Yes. Try to find out the location of setenv() [ie: which 
> library contains it]
> Or just see libvo/vo_sdl.c:
> 
> #if     defined(sun) && defined(__svr4__)
> /* setenv is missing on solaris */
> static void setenv(const char *name, const char *val, int _xx)
> {
>     int len  = strlen(name) + strlen(val) + 2;
>     char *env = malloc(len);
> 
>     if (env != NULL) {
>         strcpy(env, name);
>         strcat(env, "=");
>         strcat(env, val);
>         putenv(env);
>     }
> }
> #endif
> 
> You only need to add HPUX, since it seems HPUX does not know 
> setenv() either ...

I added this to libvo/vo_sdl.c:

#if     defined(HPUX)
/* setenv is missing on HPUX */
static void setenv(const char *name, const char *val, int _xx)
{
    int len  = strlen(name) + strlen(val) + 2;
    char *env = malloc(len);

    if (env != NULL) {
        strcpy(env, name);
        strcat(env, "=");
        strcat(env, val);
        putenv(env);
    }
}
#endif

and set CFLAGS= -DHPUX, but the same problem:
....
gcc -DHPUX -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibmpdemux -Iloader -I
libvo   -o mplayer mplayer.o mp_msg.o xacodec.o cpudetect.o codec-cfg.o cfgparser.o my_profile.o spu
dec.o playtree.o playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o lirc_mp.o mix
er.o mp-opt-reg.o -Llibvo -lvo  -Llibmpcodecs -lmpcodecs -Lmp3lib -lMP3 -Lliba52 -la52 -Llibmpeg2 -l
mpeg2 -Llibavcodec -lavcodec   -Llibmpdemux -lmpdemux  -Linput -linput           -ldvdread -lpthread
    -Lpostproc -lpostproc  -Llinux -losdep -ltermcap   -lz  -lpng -lz -ljpeg   -lm  -Llibao2 -lao2 -
lnsl    -L/usr/local/lib -lSDL -L/usr/lib -lpthread
/usr/ccs/bin/ld: Unsatisfied symbols:
   setenv (first referenced in libao2/libao2.a(afmt.o)) (code)
collect2: ld returned 1 exit status
gmake: *** [mplayer] Error 1

thanks Martin




More information about the MPlayer-users mailing list