On 8/22/12 8:20 PM, Alexander Hansen wrote:
> On 8/22/12 5:56 PM, Jiuhai Zhao wrote:
>> Hi,
>> I have some problems in installing xfig by fink. Can you help me figure
>> out? thanks for your time.
>>
>>
>>
>> 1 warning generated.
>> rm -f w_export.o
>> cc -c -Os -Wall -Wpointer-arith -no-cpp-precomp    -I/sw/include
>> -I/sw/include -I/usr/X11R6/include/X11 -I/usr/X11/include  
>>  -D__x86_64__ -D__DARWIN__                                 -DNO_ALLOCA
>> -DCSRG_BASED        -DUSE_XPM -DXAW3D -DXAW3D1_5E -DUSE_JPEG  
>> -DNEWARROWTYPES    w_export.c
>> w_export.c:1019:5: error: non-void function 'toggle_hpgl_pcl_switch'
>> should return a value [-Wreturn-type]
>>     return;
>>     ^
>> w_export.c:1041:5: error: non-void function 'toggle_hpgl_font' should
>> return a value [-Wreturn-type]
>>     return;
>>     ^
>> w_export.c:1118:28: warning: incompatible pointer types passing 'void
>> (Widget, Widget *, int *)' to parameter of type 'XtCallbackProc'
>>       (aka 'void (*)(Widget, XtPointer, XtPointer)')
>> [-Wincompatible-pointer-types]
>>                         (Widget) NULL, mag_lab, update_mag, buf, 0.0,
>> 10000.0, 1.0, 45);
>>                                                 ^~~~~~~~~~
>> ./w_util.h:90:122: note: passing argument to parameter 'callback' here
>> extern  Widget  MakeFloatSpinnerEntry(Widget parent, Widget *text, char
>> *name, Widget below, Widget beside, XtCallbackProc callback, char ...
>>                                                                        
>>                                                    ^
>> w_export.c:1426:33: warning: array subscript is of type 'char'
>> [-Wchar-subscripts]
>>         FirstArg(XtNlabel, orient_items[appres.landscape]);
>>         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
>> ./w_util.h:155:31: note: expanded from macro 'FirstArg'
>>         { XtSetArg(Args[0], (name), (val)); ArgCount=1;}
>>                                      ^
>> /usr/X11/include/X11/Intrinsic.h:1158:57: note: expanded from macro
>> 'XtSetArg'
>>     ((void)( (arg).name = (n), (arg).value = (XtArgVal)(d) ))
>>                                                         ^
>> 2 warnings and 2 errors generated.
>> make: *** [w_export.o] Error 1
>> ### execution of /tmp/fink.t1dFL failed, exit code 2
>> ### execution of /tmp/fink.DYSRb failed, exit code 2
>> Removing runtime build-lock...
>> Removing build-lock package...
>> /sw/bin/dpkg-lockwait -r fink-buildlock-xfig-3.2.5-2013
>> (Reading database ... 6023 files and directories currently installed.)
>> Removing fink-buildlock-xfig-3.2.5-2013 ...
>> Failed: phase compiling: xfig-3.2.5-2013 failed
>>
>>
>> Package manager version: 0.34.2
>> Distribution version: selfupdate-rsync Wed Aug 22 17:36:29 2012, 10.7,
>> x86_64
>> Trees: local/main stable/main
>> Xcode.app: 4.4.1
>> Xcode command-line tools: 4.4.0.0.1.1249367152
>> Max. Fink build jobs:  1
>>
>>
>>
>> jiuhai
>>
>>
> 
> You've got the same Xcode version as is used in 10.8, and the 10.8
> version of the package has been fixed to work around this failure.  What
> you could do is modify the CompileScript block of
> /sw/fink/10.7/stable/main/finkinfo/graphics/xfig.info from:
> 
> CompileScript: <<
> #!/bin/sh -ev
>  export PATH=%p/lib/xmkmf/bin:$PATH
>  export IMAKEINCLUDE=-I%p/lib/X11/config
>  xmkmf
>  make PREFIX=%p CDEBUGFLAGS=-O0 w_fontpanel.o
>  make PREFIX=%p
> <<
> 
> to:
> 
> CompileScript: <<
> #!/bin/sh -ev
>  perl -pi -e 's|CC = cc|CC = llvm-gcc|' Imakefile
>  export PATH=%p/lib/xmkmf/bin:$PATH
>  export IMAKEINCLUDE=-I%p/lib/X11/config
>  xmkmf
>  make PREFIX=%p CDEBUGFLAGS=-O0 w_fontpanel.o
>  make PREFIX=%p
> <<
> 
> that is, add the "perl -pi -e ..." line.
> 
> I've cc'ed the maintainer, since the package is broken for all users on
> 10.7 who have Xcode 4.4.
> 

As an alternative fix, I tried changing the perl -pi line thusly:

perl -pi -e 's|(CC = cc)|\1 -Wno-return-type|' Imakefile

This allows the package to build under clang-4.0 by overriding
-Wreturn-type.
-- 
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to