[Lcdproc] hmmm, compile for OS X

Russell Jones spam@codeofficer.com
Tue Dec 5 08:09:02 2006


--Apple-Mail-1-167795334
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Fantastic Eric!!

That fixed things for me! As you said, running ...

./configure --prefix=/opt/local --enable-drivers=all
make
... (wait for the fail) ...
make CFLAGS=-fnested-functions
sudo make install

... installed just fine! I can't thank you enough. I'm so happy to be  
moving onto the next step in my pursuit of attaching some sort of  
blinky blue LCD to my new mac pro :)

One question though, aside from memorizing the traditional "./ 
configure, make, sudo make install" I'm really quite stupid about  
compiling apps. Would doing it this way corrupt the resulting build  
files in any way?

Oh and did you discover the fix on an intel machine? Just curious if  
you got a hold of one.

Thanks again Eric,

-Russ Jones


On Dec 5, 2006, at 12:18 AM, Eric Pooch wrote:

> Russell,
>
> I finally ran into the same problem you have.   It is definitely  
> dependent on the gcc version and the use of make CFLAGS=-fnested- 
> functions
>
> Here is what I did to get past it:
>
> make clean
>
> make
> - This will error out on parse.c: In function 'parse_message':
>
> make CFLAGS=-fnested-functions
> -This will finish compiling correctly.
>
> --Eric
>
> On Dec 4, 2006, at 6:59 PM, Eric Pooch wrote:
>
>> Russell,
>>
>> I  downloaded the latest XCode with the latest gcc.  I had the  
>> same error about nested functions as you did. Apparently, my old  
>> version had nested functions enabled by default.
>>
>> So I tried "make CFLAGS=-fnested-functions" and everything  
>> compiled correctly.
>>
>> I then tried to cross-compile using the i386 architecture and  
>> again (I think) had no problem.  I am sending you the binaries I  
>> compiled off the list.  I have no way of testing them, so I don't  
>> know if they will work.  There may very well be a bug in gcc for  
>> the intel mac or a configuration error that only appears when  
>> compiling on there.
>>
>> Let me know off the list if there is a problem running the binaries.
>>
>> --Eric
>>
>> On Dec 3, 2006, at 12:25 PM, Russell Jones wrote:
>>
>>> FYI,
>>>
>>> I downloaded the most recent nightly build (lcdproc-CVS- 
>>> current-20061203) and gave it a shot, I still end up at the same  
>>> error however.
>>>
>>> here are the commands I used on two attempts to build it:
>>>
>>> ./configure --prefix=/usr/local --enable-drivers=CFontz
>>>
>>> make
>>>
>>> configfile.c: In function 'config_read_string':
>>> configfile.c:139: error: nested functions are disabled, use - 
>>> fnested-functions to re-enable
>>> make[2]: *** [configfile.o] Error 1
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all] Error 2
>>>
>>> make clean
>>>
>>> ./configure --prefix=/usr/local --enable-drivers=CFontz
>>>
>>> make CFLAGS=-fnested-functions
>>>
>>> and i get ...
>>>
>>> /usr/bin/ld: -allow_stack_execute can only be used when output  
>>> file type is MH_EXECUTE
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [CFontz.so] Error 1
>>> make[2]: *** [all-recursive] Error 1
>>> make[1]: *** [all-recursive] Error 1
>>> make: *** [all] Error 2
>>>
>>> Again the machine I use is a hot off the shelf 4x 3ghz mac pro  
>>> (intel)
>>>
>>> -Russ
>>>
>>>
>>> On Dec 3, 2006, at 7:08 AM, Peter Marschall wrote:
>>>
>>>> Hi Russell,
>>>>
>>>> On Friday, 1. December 2006 12:33, Russell Jones wrote:
>>>>> I'm BCC'ing Mike as well. Thanks for the tip mike, you got me one
>>>>> step further in my pursuit!
>>>>>
>>>>> UPDATE:
>>>>>
>>>>> I did some homework and found that if i took eric's build files  
>>>>> and
>>>>> ran "make clean" and then a:
>>>>>
>>>>> make CFLAGS=-fnested-functions
>>>>>
>>>>> ... then I am able to get past the errors about nesting. Now  
>>>>> however
>>>>> I am getting an error further down like this:
>>>>>
>>>>> /usr/bin/ld: -allow_stack_execute can only be used when output  
>>>>> file
>>>>> type is MH_EXECUTE
>>>>> collect2: ld returned 1 exit status
>>>>> make[3]: *** [bayrad.so] Error 1
>>>>> make[2]: *** [all-recursive] Error 1
>>>>> make[1]: *** [all-recursive] Error 1
>>>>> make: *** [all] Error 2
>>>>>
>>>>> Not quite sure what to make of this one, I did find lots of  
>>>>> seemingly
>>>>> relevant text about it on this page (http://developer.apple.com/
>>>>> documentation/Darwin/Reference/ManPages/man1/ld.1.html), though  
>>>>> its a
>>>>> bit above my level of understanding.
>>>>
>>>> I have just committed a patch to configfile.c in CVS that hides the
>>>> whole code that uses the nested function behind and #ifdef.
>>>> This is possible because the code using the nested function
>>>> is not used at all ;-)
>>>>
>>>> The patch compiles file, but it is untested.
>>>> Please test and report feedback.
>>>>
>>>> Peter
>>>>
>>>> -- 
>>>> Peter Marschall
>>>> peter@adpm.de
>>>> _______________________________________________
>>>> LCDproc mailing list
>>>> LCDproc@lists.omnipotent.net
>>>> http://lists.omnipotent.net/mailman/listinfo/lcdproc
>>>>
>>>
>>
>


--Apple-Mail-1-167795334
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; "><DIV>Fantastic =
Eric!!</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>That =
fixed things for me! As you said, running ...</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>./configure =
--prefix=3D/opt/local --enable-drivers=3Dall</DIV><DIV>make</DIV><DIV>... =
(wait for the fail) ...</DIV>make =
CFLAGS=3D-fnested-functions<DIV>sudo=A0make install<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>... installed just fine! I =
can't thank you enough. I'm so happy to be moving onto the next step in =
my pursuit of attaching some sort of blinky blue LCD to my new mac pro =
:)</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>One =
question though, aside from memorizing the traditional "./configure, =
make, sudo make install" I'm really quite stupid about compiling apps. =
Would doing it this way corrupt the resulting build files in any =
way?</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>Oh and =
did you discover the fix on an intel machine? Just curious if you got a =
hold of one.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Thanks again =
Eric,</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>-Russ =
Jones</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><BR><DIV><DIV>On Dec 5, 2006, at =
12:18 AM, Eric Pooch wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">Russell,<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>I finally ran into the same =
problem you have.=A0 =A0It is definitely dependent on the gcc version =
and the use of=A0make CFLAGS=3D-fnested-functions</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Here is what I did to get =
past it:</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>make =
clean</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>make</DIV><DIV>- This will =
error out on=A0parse.c: In function 'parse_message':</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>make =
CFLAGS=3D-fnested-functions</DIV><DIV>-This will finish compiling =
correctly.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>--Eric</DIV><DIV><BR><DIV><DI=
V>On Dec 4, 2006, at 6:59 PM, Eric Pooch wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite">Russell,<DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>I=A0 downloaded the latest =
XCode with the latest gcc.=A0 I had the same error about nested =
functions as you did. Apparently, my old version had nested functions =
enabled by default.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>So I tried "make =
CFLAGS=3D-fnested-functions" and everything compiled =
correctly.</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>I =
then tried to cross-compile using the i386 architecture and again (I =
think) had no problem.=A0 I am sending you the binaries I compiled off =
the list.=A0 I have no way of testing them, so I don't know if they will =
work.=A0 There may very well be a bug in gcc for the intel mac or a =
configuration error that only appears when compiling on =
there.</DIV><DIV><BR class=3D"khtml-block-placeholder"></DIV><DIV>Let me =
know off the list if there is a problem running the =
binaries.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>--Eric</DIV><DIV><DIV><DIV><B=
R class=3D"khtml-block-placeholder"></DIV><DIV>On Dec 3, 2006, at 12:25 =
PM, Russell Jones wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE =
type=3D"cite"><DIV>FYI,=A0</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>I downloaded the most =
recent nightly build (<FONT class=3D"Apple-style-span" face=3D"Lucida =
Grande">lcdproc-CVS-current-20061203)=A0</FONT>and gave it a shot, I =
still end up at the same error however.</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>here are the commands I =
used on two attempts to build it:</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>./configure =
--prefix=3D/usr/local --enable-drivers=3DCFontz</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>make</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><B>configfile.c: In =
function 'config_read_string':</B></DIV><DIV><B>configfile.c:139: error: =
nested functions are disabled, use -fnested-functions to =
re-enable</B></DIV><DIV><B>make[2]: *** [configfile.o] Error =
1</B></DIV><DIV><B>make[1]: *** [all-recursive] Error =
1</B></DIV><DIV><B>make: *** [all] Error 2</B></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>make clean</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>./configure =
--prefix=3D/usr/local --enable-drivers=3DCFontz</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>make =
CFLAGS=3D-fnested-functions</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>and i get ...</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV><B>/usr/bin/ld: =
-allow_stack_execute can only be used when output file type is =
MH_EXECUTE</B></DIV><DIV><B>collect2: ld returned 1 exit =
status</B></DIV><DIV><B>make[3]: *** [CFontz.so] Error =
1</B></DIV><DIV><B>make[2]: *** [all-recursive] Error =
1</B></DIV><DIV><B>make[1]: *** [all-recursive] Error =
1</B></DIV><DIV><B>make: *** [all] Error 2</B></DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>Again the machine I use is =
a hot off the shelf 4x 3ghz mac pro (intel)</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>-Russ</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><BR><DIV><DIV>On Dec 3, 2006, at =
7:08 AM, Peter Marschall wrote:</DIV><BR =
class=3D"Apple-interchange-newline"><BLOCKQUOTE type=3D"cite"><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Hi Russell,</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">On Friday, 1. December 2006 =
12:33, Russell Jones wrote:</DIV> <BLOCKQUOTE type=3D"cite"><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">I'm BCC'ing Mike as well. Thanks for the tip mike, =
you got me one</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">step further in my =
pursuit!</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">UPDATE:</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">I did some homework and found =
that if i took eric's build files and</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ran =
"make clean" and then a:</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">make =
CFLAGS=3D-fnested-functions</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">... then I am able to get past =
the errors about nesting. Now however</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I am =
getting an error further down like this:</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
min-height: 14px; "><BR></DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">/usr/bin/ld: =
-allow_stack_execute can only be used when output file</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">type is MH_EXECUTE</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; =
">collect2: ld returned 1 exit status</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make[3]: =
*** [bayrad.so] Error 1</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make[2]: *** =
[all-recursive] Error 1</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make[1]: *** =
[all-recursive] Error 1</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">make: *** =
[all] Error 2</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Not quite sure what to make of this one, I did find =
lots of seemingly</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">relevant text about it on this =
page (<A =
href=3D"http://developer.apple.com">http://developer.apple.com</A>/</DIV><=
DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; =
">documentation/Darwin/Reference/ManPages/man1/ld.1.html), though its =
a</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: =
0px; margin-left: 0px; ">bit above my level of understanding.</DIV> =
</BLOCKQUOTE><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">I have just committed a patch to configfile.c in CVS =
that hides the<SPAN class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">whole code that uses the nested function behind and =
#ifdef.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">This is possible because the =
code using the nested function</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">is not used =
at all ;-)</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">The patch compiles file, but it is =
untested.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">Please test and report =
feedback.</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">Peter</DIV><DIV style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: =
14px; "><BR></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; ">--<SPAN =
class=3D"Apple-converted-space">=A0</SPAN></DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Peter =
Marschall</DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><A =
href=3D"mailto:peter@adpm.de">peter@adpm.de</A></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; =
">_______________________________________________</DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; ">LCDproc mailing list</DIV><DIV style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A =
href=3D"mailto:LCDproc@lists.omnipotent.net">LCDproc@lists.omnipotent.net<=
/A></DIV><DIV style=3D"margin-top: 0px; margin-right: 0px; =
margin-bottom: 0px; margin-left: 0px; "><A =
href=3D"http://lists.omnipotent.net/mailman/listinfo/lcdproc">http://lists=
.omnipotent.net/mailman/listinfo/lcdproc</A></DIV><DIV =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; min-height: 14px; "><BR></DIV> =
</BLOCKQUOTE></DIV><BR></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV><BR=
></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>=

--Apple-Mail-1-167795334--