Re: Compilation
Hey Michal, if you still subscribe, I know this was a very long time ago, but this has been bugging me so I want to thank you for your advice. This was 9 years ago. Ultimately I just had a lot to learn. Besides not staying up all night to solve dependency issues and writing to mailing lists in an upset tone. I'm sorry about that. I was 17 at the time. I think I read your response, but then I gave up on my project to make my own open source RPG at the time. In some way I just wanted to get the job done. I looked at the PyGTK link you posted. It looks like a pretty direct way to get started doing drawings. A lot of other things would be involved with an RPG, including sound, animations, and AI. It's also good advice to not get frustrated, too. Thanks, Carlos On Wed, Jul 21, 2004 at 01:16:20 PDT, Michal Pasternak < mic...@pasternak.w.lub.pl> wrote: > Carlos Torchia [Wed, Jul 21, 2004 at 06:02:43AM +0100]: > >* Hi. I can't compile a program using the G2 graphics*>* library. When I > >tried compiling the program the first*>* time, cc said it didn't know that > >g2.h was in*>* /usr/local/include, which I think is pretty stupid.*>* > >Anyway, I put /usr/local/include and /usr/local/lib in*>* the -I and -L > >parameters respectively.* > Yes, that's correct. You need to pass -I and -L each time you compile a > program, that has its libs / includes not in /usr/{lib,include} . > > There are 3 options: use Linux (which has almost everything in /usr/include > and /usr/lib, but you still have to pass -I and -L sometimes, for postgresql > for example); symlink all files in /usr/X11R6/{lib,include} and > /usr/local/{lib,include} in your /usr/{lib,include} - which will clobber up > your filesystem a bit; learn to write / use Makefiles or pkg-config stuff. > > For example, you could write Makefile like: > > myprogram: myprogram.c > $(CC) -o myprogram `gtk-config --libs --cflags` myprogram.c > > >* Then it saw*>* the header and library files, but there were constant*>* > >errors saying that there were undefined references to*>* X11 functions > >within libg2.a.* > Aye! That's why you specify -L/usr/X11R6/lib -lX11 and some more stuff on > gcc command line. > > Too hard, too complicated, takes too much time? Well. Either write a good > makefile, or try to learn some IDE for GCC (anjuta, kdevelop), which can > propably take care of this automatically. I think, that learning > automake/autoconf (the scripts, that generate "configure" script, that > autodetects library locations) can be hard/unneeded for you at the moment. > > >* and how to redirect error output from*>* programs to files (or pipe them), > >because everything I*>* need to now about Unix or FreeBSD comes from 72 > >hours of*>* trying to figure out how to make a directory or something.* > Google is your > friend:http://www.bo.infn.it/alice/alice-doc/mll-doc/usrgde/node18.html > > >* I'm sorry, but I just can't do anything in this operating*>* system. I > >mean, finally I've found a library that makes*>* it simple to simply plot a > >pixel in a window without*>* spending hours looking for a GTK tutorial that > >will tell*>* me about this stupid graphics context stuff that I don't*>* > >even know. And now I gotta figure out about this stupid*>* g2 thing. Ok. > >Well anyway, thanks for any help you can*>* give me.* > If you just want to "get the job done", I'd suggest Python. You don't care > about compilation, libraries, other stuff - and it is extremely simple to > draw stuff using PyGTK > -http://www.moeraki.com/pygtktutorial/pygtk2tutorial/ch-DrawingArea.html > > If "graphics context" stuff bothers you, well, that's somehow "standard" way > to draw stuff, well, X has it and win32 also has it :) If you want to use > something like a framebuffer, I am sure you can find something, no matter if > in GTK or X11 (I'd suggest XSHM extension for framebuffer-like stuff, but > well, I've written my last pure-X11 application about 5 years ago, and I'm > sure, that things have changed). > > Hope this helps. Don't get frustrated - spend another 72 hours actually > reading the docs, unix is simple, but sometimes not as simple, as you may > suppose :) > -- > m > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: compilation vs binary files
On Tue, 6 Jan 2009 14:16:51 +0100, "Stefan Miklosovic" wrote: > hi, > > i would like to know, if it has a sense to compile software provided > in form of ports in /usr/ports. I mean, I know there is a bunch of > options you can choose from and make certain application more > suitable for your hardware / software needs. I just want to know, if > I can install software in binary form (eg. pkg_add -r soft) without > a significant change of performance to my machine. If I lost some > percents of perfromance, I would rather install it in that way like > to compile it and lose a lot of time ... For most software provided as precompiled binary packages, there is no loss in speed, especially not if today's hardware is considered. As you mentioned correctly, there are applications where building from source is the better way in many regards (e. g. mplayer: codecs, CPU optimization). You usually do this on older hardware for some speed gain, but on modern hardware... > Yes, there is also a matter of patches and updates, because software > is constantly improving. Have even a packages in binary form a sense? Yes, they have, especially if you don't have the hardware for a long compilation process - just consider KDE or OpenOffice - I wouldn't even compile them on today's hardware. :-) Binary packages often make the life easier. Personally, I do prefer them. But as you know, you can't always use them (you mentioned the reasons above). You can, for example, put a collection of already compiled software on a CD or DVD in the common tbz form and then install them on another system (that may have no Internet access). The advantage is that you have your software running right after install, no time is needed to build from sources. Binary packages aren't always "up to date" (they're not compiled with every change in the port's source code), so if you're requiring "bleeding edge" software, using the ports and building from source is the better way to go. But if you intend to once install a system and then let it run, there's no problem using software from binary packages. Especially on servers, you usually do the neccessary updates (such as security patches) and keep the rest as it is. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Compilation error libpcre.so.0: ELF file OS ABI invalid
In the last episode (Sep 28), vittorio said: > Context: Intel Core Duo, FreeBSD 6.2-p7, latest portsnap, gcc-4.2.2. > Updating the statistical program R, some packages fail to compile (I use > tarballs) because this cryptic error pops up > > * Installing *source* package 'MCMCpack' ... > checking for C++ compiler default output file name... a.out > checking whether the C++ compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C++ compiler... grep: error while > loading shared libraries: /usr/local/lib/libpcre.so.0: ELF file OS ABI invalid > yes > checking whether c++ accepts -g... grep: error while loading shared > libraries: /usr/local/lib/libpcre.so.0: ELF file OS ABI invalid > yes > > It seems that during the compilation a-linux-connected-lib is being looked > for, doesn't it? > > Anyway, what should I do? I'd check $PATH and maybe $LD_PRELOAD for things pointing into /compat/linux . Moving /usr/compat/linux/lib/libpcre.so.0 out of the way might change the error message and help you track down the cause. Running "ktrace -d" or "truss -f" on your port build might help too. Another possibility is that the freebsd-port version of /usr/local/lib/libpcre.so.0 has gotten damaged somehow. FreeBSD's grep doesn't link with pcre so it's sort of unlikely that that would be the cause, though. -- Dan Nelson [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: compilation problems with some code from Linux
On 12/8/06, Lane <[EMAIL PROTECTED]> wrote: On Friday 08 December 2006 11:21, Andrew Falanga wrote: > Hi, > > I'm trying to port some code from Linux to FreeBSD and I've got an issue > that revolves around something I've never dealt with before. The code > includes the following header: > > #include > > Apparently, program is attempting to make use of the xucred structure > defined in there, because the rest of the stuff in the file seems to be for > the kernel. However, when I try to compile, gcc continually bails with the > following error (among others), "NGROUPS was not declared in this scope." > The NGROUPS appears to be a macro, but it's not defined earlier on. Would > anyone here know where it's defined so I can include that file too? > > Secondly, I'm also getting errors because gcc can't find > either. True enough, there isn't any vfs.h file in /usr/include/sys. > Since this file is in Linux, what should I include for FreeBSD? > > Thanks, > Andy > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" Andy, I won't pretend to know exactly which header files correspond for your port, but in the past I've found some things that work for me: use locate vfs.h to find similar file names. On 6.x and 5.x I see that these are possible candidates: /usr/X11R6/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs.h /usr/include/fs/devfs/devfs.h /usr/include/sys/statvfs.h /usr/local/include/af_vfs.h /usr/src/sys/compat/svr4/svr4_statvfs.h /usr/src/sys/fs/devfs/devfs.h /usr/src/sys/nfs4client/nfs4_vfs.h /usr/src/sys/sys/statvfs.h But you'd have to compare the functions and structures defined in sys/vfs.h on linux to determine which is your best match up. There is /usr/ports/devel/mipsel-linux-kernel-headers/ which, according to pkg-plist will install mipsel-linux/include/linux/vfs.h. That may be exactly what you need (although it may be overkill). Or it may be the LAST thing you need :) Sometimes a porter will simply create a patch file in /usr/ports//files that will create a skeleton version of the file which includes only the items you need. I've done this for development on my own system. As far as the NGROUP or other macros ... yikes! You may have to recreate that functionality entirely. I ran this: #!/bin/sh for each in `locate .h | grep '\.h$'` do if [ -f $each ]; then MYF=`cat $each | grep -i ngroups` if [ "x$MYF" != "x" ]; then echo $each : "$MYF" fi MYF="" fi done It could probably be done more easily with sed and some elbow grease, but it does show NGROUPS defined here: /usr/X11R6/include/X11/Xos.h : #define NGROUPS 16 and /usr/include/sys/param.h among other places. Good luck! lane ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to " [EMAIL PROTECTED]" Thank you everyone. I'm sorry that I didn't reply sooner. I did get this worked out, but unfortunately I don't remember the include file I had to use. I found in a different file than the one I was editing at the time I wrote this a nice comment explaining why the "#include " preprocessor directive was there. I found that function in a different include file for FreeBSD, changed the code and all was well. Thanks again. Andy ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: compilation problems with some code from Linux
On 2006-12-08 10:21, Andrew Falanga <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to port some code from Linux to FreeBSD and I've got > an issue that revolves around something I've never dealt with > before. The code includes the following header: > > #include > > Apparently, program is attempting to make use of the xucred > structure defined in there, because the rest of the stuff in > the file seems to be for the kernel. However, when I try to > compile, gcc continually bails with the following error (among > others), "NGROUPS was not declared in this scope." The NGROUPS > appears to be a macro, but it's not defined earlier on. Would > anyone here know where it's defined so I can include that file > too? > > Secondly, I'm also getting errors because gcc can't find > either. True enough, there isn't any vfs.h file in > /usr/include/sys. Since this file is in Linux, what should I > include for FreeBSD? Since these interfaces are not available in FreeBSD, and they are Linux-specific, you have to find out *why* they are used and look for equivalent functionality in FreeBSD -- provided there *is* something equivalent, of course. - Giorgos ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: compilation problems with some code from Linux
On Friday 08 December 2006 11:21, Andrew Falanga wrote: > Hi, > > I'm trying to port some code from Linux to FreeBSD and I've got an issue > that revolves around something I've never dealt with before. The code > includes the following header: > > #include > > Apparently, program is attempting to make use of the xucred structure > defined in there, because the rest of the stuff in the file seems to be for > the kernel. However, when I try to compile, gcc continually bails with the > following error (among others), "NGROUPS was not declared in this scope." > The NGROUPS appears to be a macro, but it's not defined earlier on. Would > anyone here know where it's defined so I can include that file too? > > Secondly, I'm also getting errors because gcc can't find > either. True enough, there isn't any vfs.h file in /usr/include/sys. > Since this file is in Linux, what should I include for FreeBSD? > > Thanks, > Andy > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" Andy, I won't pretend to know exactly which header files correspond for your port, but in the past I've found some things that work for me: use locate vfs.h to find similar file names. On 6.x and 5.x I see that these are possible candidates: /usr/X11R6/include/gnome-vfs-2.0/libgnomevfs/gnome-vfs.h /usr/include/fs/devfs/devfs.h /usr/include/sys/statvfs.h /usr/local/include/af_vfs.h /usr/src/sys/compat/svr4/svr4_statvfs.h /usr/src/sys/fs/devfs/devfs.h /usr/src/sys/nfs4client/nfs4_vfs.h /usr/src/sys/sys/statvfs.h But you'd have to compare the functions and structures defined in sys/vfs.h on linux to determine which is your best match up. There is /usr/ports/devel/mipsel-linux-kernel-headers/ which, according to pkg-plist will install mipsel-linux/include/linux/vfs.h. That may be exactly what you need (although it may be overkill). Or it may be the LAST thing you need :) Sometimes a porter will simply create a patch file in /usr/ports//files that will create a skeleton version of the file which includes only the items you need. I've done this for development on my own system. As far as the NGROUP or other macros ... yikes! You may have to recreate that functionality entirely. I ran this: #!/bin/sh for each in `locate .h | grep '\.h$'` do if [ -f $each ]; then MYF=`cat $each | grep -i ngroups` if [ "x$MYF" != "x" ]; then echo $each : "$MYF" fi MYF="" fi done It could probably be done more easily with sed and some elbow grease, but it does show NGROUPS defined here: /usr/X11R6/include/X11/Xos.h : #define NGROUPS 16 and /usr/include/sys/param.h among other places. Good luck! lane ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Compilation
Carlos Torchia [Wed, Jul 21, 2004 at 06:02:43AM +0100]: > Hi. I can't compile a program using the G2 graphics > library. When I tried compiling the program the first > time, cc said it didn't know that g2.h was in > /usr/local/include, which I think is pretty stupid. > Anyway, I put /usr/local/include and /usr/local/lib in > the -I and -L parameters respectively. Yes, that's correct. You need to pass -I and -L each time you compile a program, that has its libs / includes not in /usr/{lib,include} . There are 3 options: use Linux (which has almost everything in /usr/include and /usr/lib, but you still have to pass -I and -L sometimes, for postgresql for example); symlink all files in /usr/X11R6/{lib,include} and /usr/local/{lib,include} in your /usr/{lib,include} - which will clobber up your filesystem a bit; learn to write / use Makefiles or pkg-config stuff. For example, you could write Makefile like: myprogram: myprogram.c $(CC) -o myprogram `gtk-config --libs --cflags` myprogram.c > Then it saw > the header and library files, but there were constant > errors saying that there were undefined references to > X11 functions within libg2.a. Aye! That's why you specify -L/usr/X11R6/lib -lX11 and some more stuff on gcc command line. Too hard, too complicated, takes too much time? Well. Either write a good makefile, or try to learn some IDE for GCC (anjuta, kdevelop), which can propably take care of this automatically. I think, that learning automake/autoconf (the scripts, that generate "configure" script, that autodetects library locations) can be hard/unneeded for you at the moment. > and how to redirect error output from > programs to files (or pipe them), because everything I > need to now about Unix or FreeBSD comes from 72 hours of > trying to figure out how to make a directory or something. Google is your friend: http://www.bo.infn.it/alice/alice-doc/mll-doc/usrgde/node18.html > I'm sorry, but I just can't do anything in this operating > system. I mean, finally I've found a library that makes > it simple to simply plot a pixel in a window without > spending hours looking for a GTK tutorial that will tell > me about this stupid graphics context stuff that I don't > even know. And now I gotta figure out about this stupid > g2 thing. Ok. Well anyway, thanks for any help you can > give me. If you just want to "get the job done", I'd suggest Python. You don't care about compilation, libraries, other stuff - and it is extremely simple to draw stuff using PyGTK - http://www.moeraki.com/pygtktutorial/pygtk2tutorial/ch-DrawingArea.html If "graphics context" stuff bothers you, well, that's somehow "standard" way to draw stuff, well, X has it and win32 also has it :) If you want to use something like a framebuffer, I am sure you can find something, no matter if in GTK or X11 (I'd suggest XSHM extension for framebuffer-like stuff, but well, I've written my last pure-X11 application about 5 years ago, and I'm sure, that things have changed). Hope this helps. Don't get frustrated - spend another 72 hours actually reading the docs, unix is simple, but sometimes not as simple, as you may suppose :) -- m ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Compilation
> I'm sorry, but I just can't do anything in this operating i'm sorry too. > system. I mean, finally I've found a library that makes > it simple to simply plot a pixel in a window without > spending hours looking for a GTK tutorial that will tell so why wasting your time and FreeBSD user's time? come back and write new cool windows app. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Compilation problems...
On Wed, Apr 07, 2004 at 08:42:19AM -0500, Eric De la Cruz Lugo wrote: > > HI All, am having problems compiling a code, this is the output from the make: > > terra# make > make all-recursive > Making all in src > if g++ -I. -I. -I.. -O6 -I/usr/include/bhpos -I'/usr/local/include/ > mysql' -g -O2 -MT servmsg.o -MD -MP -MF ".deps/servmsg.Tpo" -c -o servmsg.o > `test -f 'servmsg.cpp' || echo './'`servmsg.cpp; then mv ".deps/servmsg.Tpo" > ".deps/servmsg.Po"; else rm -f ".deps/servmsg.Tpo"; exit 1; fi > servmsg.cpp: In function `int serviceSystemWake(PLUServer*, BhPosMsg*)': > servmsg.cpp:461: error: `SOCK_PACKET' undeclared (first use this function) > servmsg.cpp:461: error: (Each undeclared identifier is reported only once for >each function it appears in.) > *** Error code 1 > SOCK_PACKET is declared in which header?. [EMAIL PROTECTED]:~ grep -r SOCK_PACKET /usr/include/ [EMAIL PROTECTED]:~ i.e. it's defined in no FreeBSD header. Check the documentation for missing dependencies or complain to the author. Kris pgp0.pgp Description: PGP signature
Re: compilation of port 'latex' fails repeatedly
"Fredrik Carlén" <[EMAIL PROTECTED]> writes: > I have tried to install latex on my new FreeBSD system, but it fails > miserably. All I do is type "$ make install distclean" in the latex > directory of the port tree (/usr/ports/print/latex). This usually does > the trick, right? Yes. > $ uname -a: > FreeBSD al-khwarizmi.intra.arrhythmetic.net 5.0-RELEASE FreeBSD > 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 > [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386 Maybe the port is broken on 5.x? A few still are; after all, it's not a production branch yet... You might want to try the teTeX distribution (/usr/ports/print/tetex); it's a very nice package. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: compilation of port 'latex' fails repeatedly
On Thu, Jun 19, 2003 at 10:12:11PM +0200, Fredrik Carlén wrote: > I have tried to install latex on my new FreeBSD system, but it fails > miserably. All I do is type "$ make install distclean" in the latex > directory of the port tree (/usr/ports/print/latex). This usually does > the trick, right? Use the print/teTeX port instead to get TeX stuff. It is what just about everybody uses. -- Erik Trulsson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Compilation Error for Nvidia Geforce4 Drivers
On Sun, 19 Jan 2003, Dilshod wrote: > Subject: Compilation Error for Nvidia Geforce4 Drivers > > Hello, > > > I've just successfully installed the latest FreeBSD 5.0 but I'm having > problems configuring my Nvidia Geforce4 video card. I've downloaded the > drivers from nvidia's web site but having trouble compiling it, though > minimal requrements are satisfied. > > Here is the error message I get: > reeBSD 5.0/-CURRENT! > *** Error code 1 > The drivers only support 4.x-STABLE at the moment. 5.0 will probably be a while yet. For what it's worth the drivers work great in 4.7. JB # John Bleichert # http://vonbek.dhs.org/latest.jpg To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Compilation Error for Nvidia Geforce4 Drivers
> reeBSD-1.0-3203/module/../src/nvidia_ctl.c > In file included from > /usr/home/dt/downloads/NVIDIA_FreeBSD-1.0-3203/src/nvidia_ctl.c:14: > /usr/home/dt/downloads/NVIDIA_FreeBSD-1.0-3203/src/nv-freebsd.h:31:2: > #error This driver does not support F > reeBSD 5.0/-CURRENT! > *** Error code 1 http://www.thirteenandtwo.org/nvidia/faq.html Q: Can I run this driver under -CURRENT? A: The NVIDIA FreeBSD driver is not officially supported under -CURRENT! Don't bitch if it doesn't work. If you want to try though, comment out lines 24 through 34 in src/nv-freebsd.h or enclose the same lines in an #if 0/endif directive. seems to work fine on my geforce2 gts w/ 5-current -randall -- :// randall s. ehren :// voice 805.893.5632 :// systems administrator:// isber|survey|avss.ucsb.edu :// institute for social, behavioral, and economic research To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message