electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » ChucK programming language
Chuck Compilation under Ubuntu
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 2 [32 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sat Dec 13, 2008 9:04 am    Post subject: Chuck Compilation under Ubuntu
Subject description: compilatoin bug
Reply with quote  Mark this post and the followings unread

hello,

I try to compil Chuck under my ubuntu and i have this message error

Code:

make -f makefile.alsa
make[1]: Entering directory `/home/toto/Bureau/miniAudicle-0.1.3.8'
make -C chuck/src -f makefile.alsa
make[2]: Entering directory `/home/toto/Bureau/miniAudicle-0.1.3.8/chuck-1.2.1.1/src'
g++ -D__LINUX_ALSA__ -c -O3 -D__CK_SNDFILE_NATIVE__ chuck_vm.cpp
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM::process_msg(Chuck_Msg*)’:
chuck_vm.cpp:1007: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM_Stack::initialize(long unsigned int)’:
chuck_vm.cpp:1373: warning: too few arguments for format
chuck_vm.cpp: In member function ‘void Chuck_VM_Shreduler::status(Chuck_VM_Status*)’:
chuck_vm.cpp:2078: error: ‘sort’ is not a member of ‘std’
make[2]: *** [chuck_vm.o] Error 1
make[2]: Leaving directory `/home/toto/Bureau/miniAudicle-0.1.3.8/chuck-1.2.1.1/src'
make[1]: *** [chuck] Error 2
make[1]: Leaving directory `/home/toto/Bureau/miniAudicle-0.1.3.8'
make: [linux-alsa] Error 2 (ignored)


Maybe somebody know this problem?
Thanks for your help...

+++
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Dec 13, 2008 9:54 am    Post subject: Reply with quote  Mark this post and the followings unread

That looks serious. I wonder what could cause this as compiling under Ubuntu has been smooth for most people so far. I suggest you email Spencer, Spencer maintains the MiniAudicle and of the ChucK devs he seems most knowledgeable on Linux as well.

Welcome on board!

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sat Dec 13, 2008 10:50 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Kassen !

Thanks for you tips, i have wrote to Spencer...and now i'm waiting Smile

i was a chuckist under windows so it's not my beginning,it's just really hardcore to compil under linux...(but i'm a beginner in lunix so)
So thanks for your welcome.

see you
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sat Dec 13, 2008 12:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I know how you feel; I made the same move (well, I still have a Windows computer as well). Still; once you get the dependencies set up it's just a matter of typing "make linux-alsa" then going off to make some tea... At least if all goes well. I don't think it's all *that* hard or scary though it does take some getting used to. At least all of the dependencies are in the regular repositories.

One thing; you aren't accidentally on a 64 bit version of Ubuntu, are you? Does one exist, even? 64 bit Linux and ChucK is still leading to issues, despite some initiatives to help fix this.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sat Dec 13, 2008 12:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

yeah,

you're right, it's not so difficult to compil (make ...) under linux... the more long is to find what is missing (dependencies...) and where ...and why...
so i'm trying to look better in the compilation instruction on princeton site Smile

i don't have a 64 bit ... my computer is 6 years old ! so i don't think it's 64 bit hehe

see you
Back to top
View user's profile Send private message
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sun Dec 21, 2008 12:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

...Always the same problem and nobody to help me... Crying or Very sad

Spencer don't answer me...
Nobody here, use MiniAudicle under Linux ?

Thanks for somthing

+++
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Dec 21, 2008 1:06 pm    Post subject: Reply with quote  Mark this post and the followings unread

I use the Mini under Linux, Ubuntu even, it build fine under other distros as well.

If you have all the dependencies it should simply compile. I don't recognise the errors you are getting though. Did you make sure you have all the listed dependencies? I notice you weren't using "make linux-alsa", why not?

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sun Dec 21, 2008 1:29 pm    Post subject: Reply with quote  Mark this post and the followings unread

hello,

yes i use
Code:
 sudo make linux-alsa

and i get this message...
moreover i m quite sure that i have all the dependencies, I'm under Intrepid...maybe that the reason why...

it's incomprehensible... for me of course Very Happy
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Dec 21, 2008 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't think the version of Ubuntu should matter though I did compile my current build before I upgraded.

I'll try compiling it again to see if this matters. If ChucK is no longer compatible with standard versions of GCC we have a real problem but right now that sounds a bit far fetched to me.

Are you only getting this issue when trying to build the Mini or does it also affect plain ChucK? Just to make absolutely sure; you did realise you also need the "dev" version of all libraries ChucK depends on? I just want to make sure you do as that turns out to be a common mistake people have been known to make at first.

(edit) it seems to be compiling fine, I'm already beyond the point where you got stuck so that at least rules out that there is something wrong in compatibility with the latest Ubuntu LTS. Good; that would be a serious issue.

(edit2) If you only looked at the Mini's build notes and not the main ChucK ones you may have overlooked the need for lex and yacc. I believe the packages to get for these are called "flex" and "bison", you may need to search in Synaptic for "lex" and "yacc". I'm just shooting in the dark here as I can't make much of the error you are getting.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sun Dec 21, 2008 3:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

yep,

I'have seen for all librairies chuck depens on. I have installed flex, bison, gcc, make, libsndfile, wxwidgets, GTK ...
Rolling Eyes


Quote:
(edit) it seems to be compiling fine, I'm already beyond the point where you got stuck so that at least rules out that there is something wrong in compatibility with the latest Ubuntu LTS. Good; that would be a serious issue.


... maybe that's the way to solution, i don't see anything more (excuse for my wonky english) Very Happy


+++
Back to top
View user's profile Send private message
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Sun Dec 21, 2008 3:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have found this :

Quote:
I tried to compile MiniAudicle on Ubuntu Intrepid, but this yielded only a slew of cryptic error messages.


On this site

http://ascriptedmelody.wordpress.com/2008/12/07/chuck-initial-impressions/

...
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Sun Dec 21, 2008 3:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hmmmm. Well, that's no good to us (or him) if there is no info at all on what sort of cryptic messages he gets. Some messages look cryptic but are actually just fairly innocent warnings while others (like your message about "sort’ is not a member of ‘std’ ") will stop the whole process.

Edit; I invited him over.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nomic



Joined: Sep 27, 2007
Posts: 10
Location: Austin, TX

PostPosted: Sun Dec 21, 2008 10:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm responding to your comment on my blog, Kassen. I'm compiling miniAudicle on Ubuntu Intrepid (8.10).

Repeated warnings (scores of them), all variations of the following:
Quote:
wxw/icons/led-blue.xpm:462: warning: deprecated conversion from string constant to ‘char*’


Compilation finally dies with:
Quote:
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM::process_msg(Chuck_Msg*)’:
chuck_vm.cpp:1007: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM_Stack::initialize(long unsigned int)’:
chuck_vm.cpp:1373: warning: too few arguments for format
chuck_vm.cpp: In member function ‘void Chuck_VM_Shreduler::status(Chuck_VM_Status*)’:
chuck_vm.cpp:2078: error: ‘sort’ is not a member of ‘std’


By no means an "innocent warning"; I did say error and not warning.

I've got lex, yacc, bison, appropriate versions of wxwidgets etc. I tried compiling for jack, alsa, and oss, all with the same results. Seems to be a problem with the Standard Template Library includes. Judging from your report, Kassen, they were changed since 8.04. What version of ChucK are you compiling?

I edited the chuck_vm.cpp source file, adding the line noted below.
Quote:
#if defined(__PLATFORM_WIN32__)
#include <windows>
#else
#include <unistd>
#include <pthread>
#include <algorithm> // Added this
#endif


The algorithm include contains the sort function that derails the make process. My change seemed to fix the original error, but now I get a new one when compiling for alsa.
Quote:
rtaudio.cpp: In member function ‘virtual bool RtApiAlsa::probeDeviceOpen(int, RtApi::StreamMode, int, int, RtAudioFormat, int*, int)’:
rtaudio.cpp:4028: error: ‘INT_MAX’ was not declared in this scope


When compiling for Jack, I get:
Quote:
ugen_stk.cpp: In function ‘long unsigned int WvIn_tick(Chuck_Object*, float, float*, Chuck_VM_Shred*)’:
ugen_stk.cpp:24226: error: ‘SHRT_MAX’ was not declared in this scope
ugen_stk.cpp: In function ‘long unsigned int WaveLoop_tick(Chuck_Object*, float, float*, Chuck_VM_Shred*)’:
ugen_stk.cpp:24325: error: ‘SHRT_MAX’ was not declared in this scope


If I get some more time later, I might try to fix this, though I do find it strange that Intrepid has problems while Hardy is reportedly providing a kosher build environment.

Edit: After doing a little more reading, it seems like to be a gcc issue. I'm running 4.3.2, and it seems that it's much more strict with C standards compliance. Hardy included gcc 4.2.x.

I went ahead and changed the makefile line that defines the compiler to use gcc-4.2 (which was also installed on my system). I also installed g++-4.2 and changed both the the miniaudicle and chuck makefiles to use the 4.2 compilers. Same errors.
Back to top
View user's profile Send private message
Nomic



Joined: Sep 27, 2007
Posts: 10
Location: Austin, TX

PostPosted: Mon Dec 22, 2008 12:04 am    Post subject: Reply with quote  Mark this post and the followings unread

Once I had gcc and g++ version 4.2.4 installed, I just had to modify the makefiles to use the right compiler version.

In both the miniaudicle directory, I changed the following in the makefile.jack:
I set CC=gcc-4.2
I changed the following line to use 'g++-4.2' instead of 'g++'.
Quote:
g++-4.2 -o $(BIN_DIR)/miniAudicle $(OBJS) $(CHUCK_OBJS) $(LIBS)


In the ChucK src directory, I changed the following in makefile.jack:
Quote:
CC?=gcc-4.2
CXX?=g++-4.2
// intervening lines left unchanged
FLAGS= -V4.2 -D__LINUX_JACK__ -c $(CFLAGS)


A very similar set of changes should work in the alsa and oss makefiles if you're building for those systems.

Once I did that, it compiled (with copious deprecated conversion warnings), and I'm now running miniAudicle on Intrepid. Seems like the code doesn't conform to the strict standards of the gcc 4.3 series, so it won't compile under the standard dev tools on 8.10.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 22, 2008 12:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Nomic wrote:
I'm responding to your comment on my blog, Kassen. I'm compiling miniAudicle on Ubuntu Intrepid (8.10).

Repeated warnings (scores of them), all variations of the following:
Quote:
wxw/icons/led-blue.xpm:462: warning: deprecated conversion from string constant to ‘char*’


Ok, yes, this "depreciated" warning, in fact a storm of them, is quite normal. Not "good" as such but in the past that hasn't led to failed compiles.

Quote:

Compilation finally dies with:
Quote:
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM::process_msg(Chuck_Msg*)’:
chuck_vm.cpp:1007: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
chuck_vm.cpp: In member function ‘long unsigned int Chuck_VM_Stack::initialize(long unsigned int)’:
chuck_vm.cpp:1373: warning: too few arguments for format
chuck_vm.cpp: In member function ‘void Chuck_VM_Shreduler::status(Chuck_VM_Status*)’:
chuck_vm.cpp:2078: error: ‘sort’ is not a member of ‘std’


By no means an "innocent warning"; I did say error and not warning.


Yes, indeed. And it's the same one that PopCode got.

Ah, and there it is; now I got it too. Kindly excuse my stubborn-ness.

Quote:

What version of ChucK are you compiling?


I just now tried to compile the latest version on the latest Ubuntu. The binaries that I have were actually compiled before I upgraded Ubuntu. When I tested it above I foolishly broke-off the compile too soon. That's my fault. Apologies for the confusion.

Anyway; so ChucK fails to compile on the latest version of GCC. That's a serious issue, I'll send it to the mailinglist immediately as that needs a fix.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 22, 2008 12:34 am    Post subject: Reply with quote  Mark this post and the followings unread

Nomic wrote:


Once I did that, it compiled


Yay! Good detective work!

It looks to me, BTW, that most of the warnings are actually caused by WXW.

It's good to have you on board, I think I came across a bit more harshly then I meant to earlier. I just meant to say that bugs are more likely to be fixed when reported to the list or the forum then when described on a personal blog. Fortunately we're all on the same page now so we can combine our efforts.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nomic



Joined: Sep 27, 2007
Posts: 10
Location: Austin, TX

PostPosted: Mon Dec 22, 2008 9:04 am    Post subject: Reply with quote  Mark this post and the followings unread

No apologies necessary, I just get terse in geek mode. Glad we could suss out the culprit!

FWIW, The gcc 4.3 problems seem to be affecting a number of FOSS projects, judging from google results for similar error strings.

Quote:
I just meant to say that bugs are more likely to be fixed when reported to the list or the forum then when described on a personal blog.

Yes, I was just in a rush when I posted that, but I intended eventually to find & report the problem.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 22, 2008 10:20 am    Post subject: Reply with quote  Mark this post and the followings unread

I think it may be a good thing in the end. More strict adherence to standards should be beneficial to a cross-platform application like ChucK.

I didn't dare push too much in that direction as it's right before Christmas and DEV's have families too but I feel this is a urgent matter and worthy of a speedy fix. I wonder if this will also affect the Mac soon as I think Apple's X-code is based on GCC too, right?

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nomic



Joined: Sep 27, 2007
Posts: 10
Location: Austin, TX

PostPosted: Mon Dec 22, 2008 2:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

I agree. Always good to find the bugs, as long as they get fixed at some point.

Not sure about OS X's build environment, but that sounds right.

At the very least, for the time being, people who have the new gcc and want to compile can work around it.
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Dec 23, 2008 2:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Nomic wrote:
I agree. Always good to find the bugs, as long as they get fixed at some point.


I'm quite sure everybody will realise this is something that will need a speedy fix. Not compiling under GCC isn't really acceptable, it's just unfortunate that this had to pop up right before Christmas.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Tue Dec 23, 2008 4:22 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi!

thanks for you tips !
I'm working too much thats why i can't answer quickly Very Happy
So I do all that you said and come a new bug...
I'm a beginner so be tolerant Wink

This is my new bug:

Code:
toto@ubuntu:~/Bureau/miniAudicle-0.1.3.8$ sudo make linux-alsa
[sudo] password for toto:
make -f makefile.alsa
make[1]: entrant dans le répertoire « /home/toto/Bureau/miniAudicle-0.1.3.8 »
gcc-4.2 -D__LINUX_ALSA__ -D__LINUX__ -D__MA_WXWIDGETS__ `wx-config  --cppflags` -O3 -c -D__CK_SNDFILE_NATIVE__ -Ichuck/src -Iwxw -I miniAudicle.cpp
gcc-4.2: pas de fichier à l'entrée
make[1]: *** [miniAudicle.o] Erreur 1
make[1]: quittant le répertoire « /home/toto/Bureau/miniAudicle-0.1.3.8 »
make: [linux-alsa] Erreur 2 (ignorée)
toto@ubuntu:~/Bureau/miniAudicle-0.1.3.8$


in english he said that he don't find any entrance to gcc-4.2.
i don't know how i can direct him to the good entrance ... Smile

any idea ?

+++
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Dec 23, 2008 6:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Most likely GCC 4.2 isn't installed. You should check whether you have it and if not use Synaptic to get it.

Hope that helps.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Tue Dec 23, 2008 7:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Yet, I have installed all necessary libraries...
i have looked on this sort of web page to find all dependancies :
http://packages.ubuntu.com/fr/intrepid/gcc-4.2

i have installed with synaptic and manually too with konsole !!

i don't know where is the problem...
Back to top
View user's profile Send private message
Nomic



Joined: Sep 27, 2007
Posts: 10
Location: Austin, TX

PostPosted: Tue Dec 23, 2008 11:54 am    Post subject: Reply with quote  Mark this post and the followings unread

Is g++-4.2 installed as well? Use the 'whereis gcc-4.2' command to make sure a binary is installed. Also try typing 'gcc-4.2 --version'.

Not sure what the problem might be.
Back to top
View user's profile Send private message
PopCode



Joined: Dec 13, 2008
Posts: 17
Location: france

PostPosted: Tue Dec 23, 2008 12:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

...Yes it seems to be good ... isn't it ?


Code:
toto@ubuntu:/usr/share/SuperCollider/SCClassLibrary/Common/GUI/Base$ whereis gcc-4.2
gcc-4: /usr/bin/gcc-4.3 /usr/bin/gcc-4.2
toto@ubuntu:/usr/share/SuperCollider/SCClassLibrary/Common/GUI/Base$ gcc-4.2 --version
gcc-4.2 (GCC) 4.2.4 (Ubuntu 4.2.4-3ubuntu4)
Copyright © 2007 Free Software Foundation, Inc.
Ce logiciel est libre ; voir les sources pour les conditions de copie.
Il n'y a AUCUNE garantie ; y compris COMMERCIALE ou pour UN BUT
PARTICULIER. (N.B. : en cas de litige, seule la version anglaise fait foi)


...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 2 [32 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use