FreshPorts -- The Place For Ports If you buy from Amazon USA, please support us by using this link.
Follow us
Blog
Twitter

I am looking for an LTO tape library. Do you have one to spare?
Help with ports
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Compile failure for MPlayer-0.99.8
Author: gmcraff 
Date:   22-07-06 02:03

After a very long series of portupgrades to try to clear any old or out-of-date dependencies, I find I must air my failure publically.

I'm trying to compile the latest MPlayer on a FreeBSD 4.11-Stable system. I have an up-to-date ports collection, and I've gone hog-wild with portupdate -R on gcc, gmake, make and every other things I can think of. I'm still getting the same error at the same place. Here's where everything stops in the make:


gcc34 -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -O -pipe -O3 -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/freetype2 -I/usr/local/include -I. -I/usr/local/include/ -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/X11R6/include -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include -I/usr/local/include/SDL11 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE -I/usr/X11R6/include -I./libavutil -I./libavcodec -o m_option.o m_option.c
m_option.c: In function `parse_position':
m_option.c:296: error: syntax error before "PRId64"
m_option.c: At top level:
m_option.c:301: error: syntax error before "if"
m_option.c: In function `print_position':
m_option.c:323: error: syntax error before "PRId64"
gmake: *** [m_option.o] Error 1
*** Error code 2

Stop in /sources/ports/multimedia/mplayer.


I've extracted the offending lines, with context. m_option.c line 296 and 301 (actually lines 295 to 307):


if (sscanf(param, sizeof(off_t) == sizeof(int) ?
"%d%c" : "%"PRId64"%c", &tmp_off, &dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",o
pt->name,param);
return M_OPT_INVALID;
}

if (opt->flags & M_OPT_MIN)
if (tmp_off < opt->min) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
"The %s option must be >= %"PRId64": %s\n",
name, (int64_t) opt->min, param);
return M_OPT_OUT_OF_RANGE;
}


And m_option.c line 323 (actually lines 322 to 324):


static char* print_position(m_option_t* opt, void* val) {
return dup_printf("%"PRId64,(int64_t)VAL(val));
}



Is there some port that I've missed that I need to upgrade so gcc34 can understand what they're trying to do, or is something actually hosed in the port and I should wait patiently for resolution?

Reply To This Message
 
 Re: Compile failure for MPlayer-0.99.8
Author: mitayai 
Date:   24-08-06 16:37

The easiest way i can think of is to change the instances of %"PRId64" with %lld

if (sscanf(param, sizeof(off_t) == sizeof(int) ?
"%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",o
pt->name,param);
return M_OPT_INVALID;
}

if (opt->flags & M_OPT_MIN)
if (tmp_off < opt->min) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
"The %s option must be >= %lld: %s\n",
name, (int64_t) opt->min, param);
return M_OPT_OUT_OF_RANGE;
}


static char* print_position(m_option_t* opt, void* val) {
return dup_printf("%lld",(int64_t)VAL(val));
}

Reply To This Message
 
 Re: Compile failure for MPlayer-0.99.8
Author: mitayai 
Date:   24-08-06 16:50

hm... here's an even quicker way. at the top of m_option.c, add:

#ifndef PRId64
#define PRId64 "lld"
#endif

if you get whining about uint_fast64_t, note this patch :

http://article.gmane.org/gmane.comp.video.mplayer.devel/36655

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.


Servers and bandwidth provided by
New York Internet, SuperNews, and RootBSD
Valid HTML, CSS, and RSS.
Copyright © 2000-2014 Dan Langille. All rights reserved.