Thread: [q-lang-users] Compiling Q on Mac OS X
Brought to you by:
agraef
From: Ryan S. <q-l...@ry...> - 2007-12-15 11:25:19
|
Hi there. I come to you from the MacPorts project [1]. MacPorts is one of the two package managers available for Mac OS X. (Fink is the other.) We have a port for Q in MacPorts, but it's for version 6.0, and it's been pointed out [2] that this is ancient and moreover does not compile for some (or possibly all) our users. Who knows whether this is because of Macs using Intel processors now, or because of updates in the OS or the compiler. I attempted to update the port to Q 7.9 but that doesn't compile either; I get "/usr/bin/ld: Undefined symbols: _coerce_float" (full error output copied below). I tried 7.8 and the error is the same. I also tried 7.7 and the error is different: "curl.c:467: error: 'CURLOPT_PASSWDFUNCTION' undeclared here (not in a function)". Any idea how I can get Q 7.9 to compile here? I'm using Mac OS X 10.4.11 with Xcode 2.4.1 on a MacBookPro3,1. The versions of the dependencies are: curl 7.17.1 with ssl support gmp 4.2.2 ncurses 5.6 ncursesw 5.6 openssl 0.9.8g readline 5.2.007 zlib 1.2.3 The configure line I used for Q 7.9 is: ./configure --prefix=/opt/local --mandir=/opt/local/share/man -- infodir=/opt/local/share/info --with-gmp --with-rl --with-pthread -- with-curl --without-gdbm --without-x --without-ggi --without-ft2 -- without-magick --without-odbc --without-tk --without-xml --without- dxl --without-dmalloc This is the same configure line that our Q 6.0 port used. Maybe some options have changed since then? Here's the full error output from trying to build Q 7.9; thanks for any help you can provide: $ sudo port build ---> Fetching q ---> Verifying checksum(s) for q ---> Extracting q ---> Configuring q ---> Building q with target all Error: Target org.macports.build returned: shell command " cd "/opt/ local/var/macports/build/_Users_rschmidt_macports_dports_lang_q/work/ q-7.9" && make all " returned error 2 Command output: clib.c: In function 'icfromwcs': clib.c:586: warning: passing argument 2 of 'libiconv' from incompatible pointer type /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../libq -I/opt/ local/include -O2 -MT clib.lo -MD -MP -MF .deps/clib.Tpo -c clib.c -o clib.o >/dev/null 2>&1 mv -f .deps/clib.Tpo .deps/clib.Plo /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/gcc-4.0 -O2 - no-undefined -module -avoid-version -L/opt/local/lib -o clib.la - rpath /opt/local/lib/q clib.lo ../../libq/libq.la -L/opt/local/lib - lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -Wl,-framework - Wl,CoreFoundation -L/opt/local/lib -liconv -R/opt/local/lib -lgmp - lpthread -L/opt/local/lib -lintl -L/opt/local/lib -liconv -lc -R/opt/ local/lib -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -liconv - R/opt/local/lib -lm /usr/bin/gcc-4.0 -o .libs/clib.so -bundle .libs/clib.o -L/opt/ local/lib ../../libq/.libs/libq.dylib /opt/local/lib/libgmp.dylib - lpthread /opt/local/lib/libintl.dylib -lc /opt/local/lib/ libiconv.dylib -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework - Wl,CoreFoundation ar cru .libs/clib.a clib.o ranlib .libs/clib.a creating clib.la (cd .libs && rm -f clib.la && ln -s ../clib.la clib.la) /bin/sh ../../libtool --tag=CC --mode=compile /usr/bin/gcc-4.0 - DHAVE_CONFIG_H -I. -I../.. -I../../libq -I/opt/local/include -O2 - MT system.lo -MD -MP -MF .deps/system.Tpo -c -o system.lo system.c /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../libq -I/opt/ local/include -O2 -MT system.lo -MD -MP -MF .deps/system.Tpo -c system.c -fno-common -DPIC -o .libs/system.o system.c: In function 'ictowcs': system.c:766: warning: passing argument 2 of 'libiconv' from incompatible pointer type system.c: In function 'icfromwcs': system.c:787: warning: passing argument 2 of 'libiconv' from incompatible pointer type system.c: In function '__F__system_iconv': system.c:6198: warning: passing argument 2 of 'libiconv' from incompatible pointer type /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I../.. -I../../libq -I/opt/ local/include -O2 -MT system.lo -MD -MP -MF .deps/system.Tpo -c system.c -o system.o >/dev/null 2>&1 mv -f .deps/system.Tpo .deps/system.Plo /bin/sh ../../libtool --tag=CC --mode=link /usr/bin/gcc-4.0 -O2 - no-undefined -module -avoid-version -L/opt/local/lib -o system.la - rpath /opt/local/lib/q system.lo ../../libq/libq.la -L/opt/local/lib - lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -Wl,-framework - Wl,CoreFoundation -L/opt/local/lib -liconv -R/opt/local/lib -lgmp - lpthread -lreadline -L/opt/local/lib -lintl -L/opt/local/lib -liconv -lc -R/opt/local/lib -Wl,-framework -Wl,CoreFoundation -L/opt/local/ lib -liconv -R/opt/local/lib -lm /usr/bin/gcc-4.0 -o .libs/system.so -bundle .libs/system.o -L/opt/ local/lib ../../libq/.libs/libq.dylib /opt/local/lib/libgmp.dylib - lpthread -lreadline /opt/local/lib/libintl.dylib -lc /opt/local/lib/ libiconv.dylib -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework - Wl,CoreFoundation /usr/bin/ld: Undefined symbols: _coerce_float collect2: ld returned 1 exit status make[4]: *** [system.la] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Error: Status 1 encountered during processing. $ [1] http://www.macports.org/ [2] http://trac.macports.org/projects/macports/ticket/12268 |
From: Albert G. <Dr....@t-...> - 2007-12-16 10:10:27
|
Ryan Schmidt wrote: > Hi there. I come to you from the MacPorts project [1]. Welcome Ryan, and thanks for taking care of the MacPorts Q package. > This is the same configure line that our Q 6.0 port used. Maybe some > options have changed since then? No, the options should be fine (although you could probably get rid of most if not all --with/without options). > /usr/bin/gcc-4.0 -o .libs/system.so -bundle .libs/system.o -L/opt/ > local/lib ../../libq/.libs/libq.dylib /opt/local/lib/libgmp.dylib - > lpthread -lreadline /opt/local/lib/libintl.dylib -lc /opt/local/lib/ > libiconv.dylib -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework - > Wl,CoreFoundation > /usr/bin/ld: Undefined symbols: > _coerce_float This should be fixed in cvs now. I also uploaded a new tarball (q-7.9-2.tar.gz). Thanks for reporting! Please let me know if you run into any other problems. Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Ryan S. <q-l...@ry...> - 2007-12-16 11:12:38
|
On Dec 16, 2007, at 04:17, Albert Graef wrote: > Ryan Schmidt wrote: > >> Hi there. I come to you from the MacPorts project [1]. > > Welcome Ryan, and thanks for taking care of the MacPorts Q package. Yes, apparently the last update to the Q port in MacPorts was 3 years ago. The maintainer seems to have disappeared. So I'll take it over and can hopefully keep it better maintained from now on. >> This is the same configure line that our Q 6.0 port used. Maybe some >> options have changed since then? > > No, the options should be fine (although you could probably get rid of > most if not all --with/without options). I'll keep them for now. In the portfiles we like to be a bit more explicit about dependencies, and not let configure pick up whatever it finds. The idea is that Q (and other ports) should build identically on every user's system, regardless of what other ports they might already have installed which Q might otherwise optionally make use of. >> /usr/bin/gcc-4.0 -o .libs/system.so -bundle .libs/system.o -L/opt/ >> local/lib ../../libq/.libs/libq.dylib /opt/local/lib/libgmp.dylib - >> lpthread -lreadline /opt/local/lib/libintl.dylib -lc /opt/local/lib/ >> libiconv.dylib -lm -Wl,-framework -Wl,CoreFoundation -Wl,-framework - >> Wl,CoreFoundation >> /usr/bin/ld: Undefined symbols: >> _coerce_float > > This should be fixed in cvs now. I also uploaded a new tarball > (q-7.9-2.tar.gz). Thanks for reporting! Please let me know if you run > into any other problems. Super! It builds just fine now. Vielen Dank! |
From: Albert G. <Dr....@t-...> - 2007-12-16 19:31:33
|
Ryan Schmidt wrote: > Yes, apparently the last update to the Q port in MacPorts was 3 years > ago. The maintainer seems to have disappeared. So I'll take it over > and can hopefully keep it better maintained from now on. That's *very* good news. I'll update our website so that it points to MacPorts asap. > I'll keep them for now. In the portfiles we like to be a bit more > explicit about dependencies, and not let configure pick up whatever > it finds. Ok, I see. Do you plan to support any of the other addons in the future? Q has interfaces to some pretty nice 3rd party libraries, and AFAICT the necessary dependencies are all readily available in MacPorts. > Super! It builds just fine now. Vielen Dank! Bitte schoen. :) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Ryan S. <q-l...@ry...> - 2007-12-18 04:21:03
|
On Dec 16, 2007, at 13:37, Albert Graef wrote: > Ryan Schmidt wrote: > >> Yes, apparently the last update to the Q port in MacPorts was 3 years >> ago. The maintainer seems to have disappeared. So I'll take it over >> and can hopefully keep it better maintained from now on. > > That's *very* good news. I'll update our website so that it points to > MacPorts asap. Super! I think MacPorts is the easiest way to install software that's distributed in source form on a Mac, so a pointer on your web site would be great. >> I'll keep them for now. In the portfiles we like to be a bit more >> explicit about dependencies, and not let configure pick up whatever >> it finds. > > Ok, I see. Do you plan to support any of the other addons in the > future? > Q has interfaces to some pretty nice 3rd party libraries, and > AFAICT the > necessary dependencies are all readily available in MacPorts. I don't use Q myself, so I'm not familiar with what all would be appropriate to add. Certainly I can add variants to the portfile that bring in additional dependencies and features. If users (or you) note anything that's missing, they can file enhancement requests in our issue tracker and assign them to me, and I'll be happy to see what needs to be done. |
From: Albert G. <Dr....@t-...> - 2007-12-19 03:43:08
|
Ryan Schmidt wrote: > Super! I think MacPorts is the easiest way to install software that's > distributed in source form on a Mac, so a pointer on your web site > would be great. Done. > I don't use Q myself, so I'm not familiar with what all would be > appropriate to add. Well, different programmers need different things, but most programmers want XML and databases nowadays, so for a start you could add the xml and sqlite3 modules, maybe also the ODBC interface. And then there's the Qt/Q module (GUI programming) and Q-OpenGL (also useful in conjunction with Qt/Q since it allows you to draw 3D graphics in a Qt window). There's also a Qt application called QCalc which provides a spreadsheet as an alternative frontend to the Q interpreter, which makes it easy to learn Q and use it as a sophisticated kind of desktop calculator. This should be easy to install once Qt/Q is working, since it's just a Q script, nothing to compile. These are just some ideas what could be useful and fun... Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Tim H. <q...@st...> - 2007-12-19 09:16:13
|
Albert Graef <Dr....@t-...> writes: [snip] > Well, different programmers need different things, but most programmers > want XML and databases nowadays, so for a start you could add the xml > and sqlite3 modules, maybe also the ODBC interface. Definitely maybe the ODBC interface, please :) Pleased to see MacPorts has included Q. If it helps, the things I usually enable are: ./configure --prefix=/usr/local/stow/q \ --with-{x,gmp,rl,pthread,curl,gdbm,magick,xml} ~Tim -- <http://spodzone.org.uk/> |
From: Ryan S. <q-l...@ry...> - 2007-12-19 09:45:47
|
On Dec 19, 2007, at 03:16, Tim Haynes wrote: > Albert Graef writes: > >> Well, different programmers need different things, but most >> programmers >> want XML and databases nowadays, so for a start you could add the xml >> and sqlite3 modules, maybe also the ODBC interface. > > Definitely maybe the ODBC interface, please :) > > Pleased to see MacPorts has included Q. If it helps, the things I > usually > enable are: > > ./configure --prefix=/usr/local/stow/q \ > --with-{x,gmp,rl,pthread,curl,gdbm,magick,xml} I'll see what I can do! |
From: Albert G. <Dr....@t-...> - 2007-12-20 01:47:44
|
Tim Haynes wrote: > Definitely maybe the ODBC interface, please :) Yes, SQLite's advantage is that it's very easy to use, but if you want to work with existing databases there's no way around ODBC. > ./configure --prefix=/usr/local/stow/q \ > --with-{x,gmp,rl,pthread,curl,gdbm,magick,xml} I didn't mention gdbm since I think it's not used all that much anymore (someone correct me if I'm wrong), but it's not a big dependency, so you might as well include the gdbm interface in the basic package, along with the xml interface. (The latter would bring in libxml2, libxslt and libz, so it wouldn't be a huge dependency either. I guess that if you use stuff from MacPorts, chances are that you already have these libraries anyway, since they are used by a lot of applications.) The magick module is nice for both graphics and web programming, but here the story is a bit different because the ImageMagick port drags in XFree86 (even if you don't need the X11 functionality), so you might want to provide this as an option. Anyway, these are just suggestions... It's good to have Q in MacPorts, even just the basic package. Now when people ask for OS X packages, I can simply refer them to your port, that's very nice. :) Cheers, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |
From: Ryan S. <q-l...@ry...> - 2007-12-20 05:59:27
|
On Dec 19, 2007, at 19:46, Albert Graef wrote: > Tim Haynes wrote: > >> Definitely maybe the ODBC interface, please :) > > Yes, SQLite's advantage is that it's very easy to use, but if you want > to work with existing databases there's no way around ODBC. > >> ./configure --prefix=/usr/local/stow/q \ >> --with-{x,gmp,rl,pthread,curl,gdbm,magick,xml} > > I didn't mention gdbm since I think it's not used all that much > anymore > (someone correct me if I'm wrong), but it's not a big dependency, > so you > might as well include the gdbm interface in the basic package, along > with the xml interface. (The latter would bring in libxml2, libxslt > and > libz, so it wouldn't be a huge dependency either. I guess that if you > use stuff from MacPorts, chances are that you already have these > libraries anyway, since they are used by a lot of applications.) I will look into providing variants for these various requests so that people who want them can have them, and those who do not will not need the extra dependencies. > The magick module is nice for both graphics and web programming, but > here the story is a bit different because the ImageMagick port > drags in > XFree86 (even if you don't need the X11 functionality), so you might > want to provide this as an option. Users are expected to install Apple's X11 (it's installed by default on Leopard, available on the install DVD for Tiger, available from Apple's web site for Panther). If Apple's X11 is present, XFree86 is not required. Users who do not want the X functionality can install the ImageMagick port with the +no_x11 variant, and then neither Apple's X11 nor XFree86 is required. > Anyway, these are just suggestions... It's good to have Q in MacPorts, > even just the basic package. Now when people ask for OS X packages, I > can simply refer them to your port, that's very nice. :) |
From: Albert G. <Dr....@t-...> - 2007-12-20 22:04:30
|
Ryan Schmidt wrote: > Users who do not want the X functionality can install > the ImageMagick port with the +no_x11 variant, and then neither > Apple's X11 nor XFree86 is required. Ah, I missed that. Great. I really have to try MacPorts on that lonely PowerMac in the office some time. :) Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |