[chuck-users] ChucK compilation error (still, again?) -- similar to the Ubuntu GCC 4.3 problem

Andrew C. Smith acsmith at willamette.edu
Sun Sep 13 17:27:00 EDT 2009


Well, long battle, but I feel like it's been worth it. I got chuck to
compile using this method on Snow Leopard:

1. Add -arch i386 to the line "FLAGS=-D__MACOSX_CORE__ -c" (so that it
shows up in every call of the file, whether it's gcc or g++)

2. Add -arch i386 to the initial call of chuck:

chuck: $(OBJS)
	$(CXX_LINK) -arch i386 -o chuck $(OBJS) $(LIBS)

I made sure that the new one was working by doing the chmod 755 and
chucking a file with a ugen I added (from the wiki tutorial).
Hopefully, if I make one UGen this will all be worthwhile.

Andrew

On Sun, Sep 13, 2009 at 4:57 PM, Roger Critchlow <rec at elf.org> wrote:
> I'm running a 64-bit release of Ubuntu, but using the chuck taken from
> the 32-bit distribution.
>
> As someone else said, use --arch i386 as an option to gcc, but make
> sure you use it everywhere that gcc gets called.  There are typically
> two places in the Makefile:  one that compiles the sources to objects,
> and one that links the objects with libraries into the final
> executable.
>
> -- rec --
>
> On Sun, Sep 13, 2009 at 11:09 AM, Andrew C. Smith
> <acsmith at willamette.edu> wrote:
>> Yeah, that was advertised as the big 10.6 changeover, so I probably
>> should have thought about it.
>>
>> How do I specify the 32-bit compile?
>>
>> Aside: Isn't Ubuntu 64-bit as well? I know very little about Linux,
>> aside from that we share a command line.
>>
>> Thanks, Roger.
>>
>> Andrew
>>
>> On Sun, Sep 13, 2009 at 1:03 PM, Roger Critchlow <rec at elf.org> wrote:
>>> Losing precision casting from a void * to a typedef'ed reference type
>>> suggests that you're compiling for a 64-bit pointer.  A quick google
>>> finds:
>>>
>>>  "Snow Leopard supports 64-bit computing more pervasively than any
>>> other Apple OS to ..."
>>>
>>> Maybe you need to specify a 32-bit compile explicitly?
>>>
>>> -- rec --
>>>
>>> On Sun, Sep 13, 2009 at 8:14 AM, Andrew C. Smith <acsmith at willamette.edu> wrote:
>>>> Hey all,
>>>>
>>>> So, I just upgraded to Snow Leopard (anyone else? I feel like the
>>>> list's guinea pig here) and now I'm getting awful compilation errors.
>>>> "gcc" gives me 4.2.1, as does g++, so it's not the exact same as the
>>>> 4.3 problem from the forum.
>>>>
>>>> Before, I could download the CVS and compile straight-through, but now
>>>> I get this:
>>>>
>>>> $ make osx
>>>> make -f makefile.osx
>>>> gcc -D__MACOSX_CORE__ -c -O3 rtmidi.cpp
>>>> rtmidi.cpp: In function ‘int get_device_name(SInt32, char*, int)’:
>>>> rtmidi.cpp:295: error: cannot convert ‘void**’ to ‘MIDIObjectRef*’ for
>>>> argument ‘2’ to ‘OSStatus MIDIObjectFindByUniqueID(MIDIUniqueID,
>>>> MIDIObjectRef*, MIDIObjectType*)’
>>>> rtmidi.cpp:304: error: cast from ‘void*’ to ‘MIDIDeviceRef’ loses precision
>>>> rtmidi.cpp:306: error: cast from ‘void*’ to ‘MIDIEntityRef’ loses precision
>>>> rtmidi.cpp:312: error: cast from ‘void*’ to ‘MIDIEndpointRef’ loses precision
>>>> rtmidi.cpp: In member function ‘virtual void RtMidiIn::openPort(unsigned int)’:
>>>> rtmidi.cpp:521: warning: NULL used in arithmetic
>>>> rtmidi.cpp: In member function ‘virtual void RtMidiOut::openPort(unsigned int)’:
>>>> rtmidi.cpp:692: warning: NULL used in arithmetic
>>>> make[1]: *** [rtmidi.o] Error 1
>>>> make: [osx] Error 2 (ignored)
>>>>
>>>> I have XCode 3.2, which came with gcc 4.2.1. The only reason I've
>>>> started with the compilation thing lately is because I wanted to check
>>>> out UGens and things--purely exploratory. I have a fully-compiled
>>>> version of the mini around, so I can still ChucK, but this is
>>>> definitely bothering me. Any ideas?
>>>>
>>>> Andrew
>>>> _______________________________________________
>>>> chuck-users mailing list
>>>> chuck-users at lists.cs.princeton.edu
>>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>>
>>> _______________________________________________
>>> chuck-users mailing list
>>> chuck-users at lists.cs.princeton.edu
>>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>>
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>


More information about the chuck-users mailing list