Re: Make Q's
On Wed, 2009-09-16 at 23:28 -0400, Kevin D. Clark wrote: Look, I could write a big writeup here, giving you a complete example of a Makefile that is similar to what I know you are looking for, but in actuality let me just tell you that I happen to be a big fan of the GNU Make manual. I think that in 20 minutes of skimming you'll be well on your way. I also like the GNU Make manual, but I found it vary hard to use when first learning make. Once you have a bit of feel for what you are doing the manual is clear and concise. http://www.gnu.org/software/make/ The art of UNIX Programming (in the library thanks to Ted Roche) has a section in the tools chapter on make, but that's a higher level discussion and not a tutorial. Eric Raymond recommends studying the fetchmail make file as a useful example. Years ago, Jason Stephenson and Dave Johnson were very helpful to me when I posted a request for help writing a makefile. I'm sure you'll get some good advice here. -- Lloyd Kvam Venix Corp DLSLUG/GNHLUG library http://dlslug.org/library.html http://www.librarything.com/catalog/dlslug http://www.librarything.com/rsshtml/recent/dlslug http://www.librarything.com/rss/recent/dlslug ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
On Wed, 2009-09-16 at 23:28 -0400, Kevin D. Clark wrote: Look, I could write a big writeup here, giving you a complete example of a Makefile that is similar to what I know you are looking for, but in actuality let me just tell you that I happen to be a big fan of the GNU Make manual. I think that in 20 minutes of skimming you'll be well on your way. Lloyd Kvam I also like the GNU Make manual, but I found it vary hard to use when first learning make. Once you have a bit of feel for what you are doing the manual is clear and concise. http://www.gnu.org/software/make/ It is hard to 'skim' 182 pages. :0 Nonetheless, allow me to ask for a critique (do I dare?) for this construct: CC=g++ CCOPTS= INCLUDES= DEPS= %.o: %.cpp $(DEPS) $(CC) -c $ $(CCOPTS) $(INCLUDES) This will process all .cpp files with the rule? Can I just add this? %.o: %.c $(DEPS) gcc -c $ $(CCOPTS) $(INCLUDES) The art of UNIX Programming (in the library thanks to Ted Roche) has a section in the tools chapter on make, but that's a higher level discussion and not a tutorial. Eric Raymond recommends studying the fetchmail make file as a useful example. I'll try to find it. Years ago, Jason Stephenson and Dave Johnson were very helpful to me when I posted a request for help writing a makefile. I'm sure you'll get some good advice here. I need it! -Bruce ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
bruce.lab...@autoliv.com writes: On Wed, 2009-09-16 at 23:28 -0400, Kevin D. Clark wrote: Look, I could write a big writeup here, giving you a complete example of a Makefile that is similar to what I know you are looking for, but in actuality let me just tell you that I happen to be a big fan of the GNU Make manual. I think that in 20 minutes of skimming you'll be well on your way. Lloyd Kvam I also like the GNU Make manual, but I found it vary hard to use when first learning make. Once you have a bit of feel for what you are doing the manual is clear and concise. http://www.gnu.org/software/make/ It is hard to 'skim' 182 pages. :0 Nonetheless, allow me to ask for a critique (do I dare?) for this construct: CC=g++ CCOPTS= INCLUDES= DEPS= %.o: %.cpp $(DEPS) $(CC) -c $ $(CCOPTS) $(INCLUDES) This will process all .cpp files with the rule? But it would also process all .c files with g++ which probably isn't what you want. Can I just add this? %.o: %.c $(DEPS) gcc -c $ $(CCOPTS) $(INCLUDES) You could, but why not just use: CXX=g++ CC=gcc ??? -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH warl...@mit.eduPGP key available ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
Derek Atkins warl...@mit.edu wrote on 09/17/2009 10:25:44 AM: bruce.lab...@autoliv.com writes: Nonetheless, allow me to ask for a critique (do I dare?) for this construct: CC=g++ CCOPTS= INCLUDES= DEPS= %.o: %.cpp $(DEPS) $(CC) -c $ $(CCOPTS) $(INCLUDES) This will process all .cpp files with the rule? But it would also process all .c files with g++ which probably isn't what you want. Can I just add this? %.o: %.c $(DEPS) gcc -c $ $(CCOPTS) $(INCLUDES) You could, but why not just use: CXX=g++ CC=gcc I am confused by your confusion... Perhaps, I've not framed the situation properly. There are two files that need to be compiled with gcc, and five with g++. One could set up two objects lists, OBJ1=file1.o file2.o== use gcc OBJ2=file3.o file4.o file5.o file6.o file7.o== use g++ SRC1=file1.c file2.c SRC2=file3.cpp file4.cpp file5.cpp file6.cpp file7.cpp CXX=g++ CC=gcc CCOPTS= INCLUDES= DEPS= I'm trying, quite unsucessfully, I may add, to design a rule that compiles things appropriately. Might this work? project: $(OBJS1) $(OBJ2) $(CXX) -o project $(OBJ1) $(OBJ2) $(LIBS) $(OBJ1): $(SRC1) $(DEPS) $(CC) -c $ $(CCOPTS) $(INCLUDES) $(OBJ2): $(SRC2) $(DEPS) $(CXX) -c $ $(CCOPTS) $(INCLUDES) ??? -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH warl...@mit.eduPGP key available ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
bruce.lab...@autoliv.com writes: There are two files that need to be compiled with gcc, and five with g++. (completely un-tested) MYFLAGS=-g -Werror -Wall -Wcast-qual CFLAGS=$(MYFLAGS) CXXFLAGS=$(MYFLAGS) # we define _XOPEN_SOURCE because # we define _GNU_SOURCE because # modify to suit to your situation CPPFLAGS=-D_XOPEN_SOURCE=500 -D_GNU_SOURCE # file1 and file2 are C files, the rest are C++ files OBJS=file1.o file2.o file3.o file4.o file5.o file6.o file7.o .PHONY: all clean war all: myproject clean: $(RM) $(OBJS) myproject.o myproject: myproject.o $(OBJS) $(CXX) $(CXXFLAGS) $+ -o $@ $(LDFLAGS) war: @echo make love not war Hope this helps, --kevin -- GnuPG ID: B280F24EGod, I loved that Pontiac. alumni.unh.edu!kdc-- Tom Waits http://kdc-blog.blogspot.com/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
/usr/bin/ld error
The fun never ends... My make file compiles everything, using the compiler of choice ( using brute force, not using elegance ). However, ld fails to find -lfftw3. The error is: /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: cannot find -lfftw3 collect2: ld returned 1 exit status make: *** [server] Error 1 Now, having lived through this once before, I made sure that /etc/ld.so.conf.d contained a file called fftw.conf $cat fftw.conf /usr/local/lib In the file /etc/ld.so.conf is: include ld.so.conf.d/*.conf ldconfig shows: # ldconfig -v ldconfig: Path `/usr/local/lib' given more than once /usr/local/lib: stuff libfftw3.so.3 - libfftw3.so.3.2.3 In the above make file the CCOPTS= -O3 -m64 -mcpu=970 -mtune=970 -D_FILE_OFFSET_BITS=64 -fopenmp -Wall -Wcast-qual Previously, I have linked another project to FFTW using the same options as above. So far, the only difference is that with the previous project I made my own script that compiled everything and linked it in one line... I wanted to use a make file this time around, the compile times are longer now... Any suggestions? I have not touched fftw since April. Haven't updated compilers either... Bruce Labitt Autoliv Electronics 1011B Pawtucket Blvd, PO Box 1858 Lowell, MA 01853 Email: bruce.lab...@autoliv.com. Tel: (978) 674-6526 Fax: (978) 674-6581 ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
What flavor are the libs in question? If you're generating x86_64 objects you can't link against i686 libs and vice versa, etc, etc... ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
On 09/17/2009 12:08 PM, bruce.lab...@autoliv.com wrote: The fun never ends... My make file compiles everything, using the compiler of choice ( using brute force, not using elegance ). However, ld fails to find -lfftw3. The error is: /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: cannot find -lfftw3 collect2: ld returned 1 exit status make: *** [server] Error 1 Throw in the output of 'file /usr/local/lib/libfftw3.*'. I'd have to guess that the fftw libraries are 32-bit while you're compiling a 64-bit application. -Mark ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
Mark Komarinski mkomarin...@wayga.org wrote on 09/17/2009 12:19:39 PM: On 09/17/2009 12:08 PM, bruce.lab...@autoliv.com wrote: The fun never ends... My make file compiles everything, using the compiler of choice ( using brute force, not using elegance ). However, ld fails to find -lfftw3. The error is: /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.so when searching for -lfftw3 /usr/bin/ld: skipping incompatible /usr/local/lib/libfftw3.a when searching for -lfftw3 /usr/bin/ld: cannot find -lfftw3 collect2: ld returned 1 exit status make: *** [server] Error 1 Throw in the output of 'file /usr/local/lib/libfftw3.*'. I'd have to guess that the fftw libraries are 32-bit while you're compiling a 64-bit application. -Mark FFTW was compiled with -m64 = 64 bit. What did you mean by Throw in the output of 'file /usr/local/lib/libfftw3.*'. ? Bruce ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
gnhlug-discuss-boun...@mail.gnhlug.org wrote on 09/17/2009 12:18:07 PM: What flavor are the libs in question? If you're generating x86_64 objects you can't link against i686 libs and vice versa, etc, etc... ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ 64 bit libs, compiled on same machine. -Bruce ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
kevin_d_cl...@comcast.net (Kevin D. Clark) wrote on 09/17/2009 12:03:20 PM: bruce.lab...@autoliv.com writes: There are two files that need to be compiled with gcc, and five with g++. (completely un-tested) MYFLAGS=-g -Werror -Wall -Wcast-qual CFLAGS=$(MYFLAGS) CXXFLAGS=$(MYFLAGS) # we define _XOPEN_SOURCE because # we define _GNU_SOURCE because # modify to suit to your situation CPPFLAGS=-D_XOPEN_SOURCE=500 -D_GNU_SOURCE where are CPPFLAGS used below? # file1 and file2 are C files, the rest are C++ files OBJS=file1.o file2.o file3.o file4.o file5.o file6.o file7.o .PHONY: all clean war all: myproject clean: $(RM) $(OBJS) myproject.o myproject: myproject.o $(OBJS) $(CXX) $(CXXFLAGS) $+ -o $@ $(LDFLAGS) war: @echo make love not war How is CXX defined? Will this automagically select gcc for *.c and g++ for *.cpp? How can the dependencies (header files) be pulled in? Hope this helps, --kevin -- GnuPG ID: B280F24EGod, I loved that Pontiac. alumni.unh.edu!kdc-- Tom Waits http://kdc-blog.blogspot.com/ ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
On 09/17/2009 12:46 PM, bruce.lab...@autoliv.com wrote: FFTW was compiled with -m64 = 64 bit. What did you mean by Throw in the output of 'file /usr/local/lib/libfftw3.*'. ? run that command: file /usr/local/lib/libfftw3.* -Mark ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: /usr/bin/ld error
Mark Komarinski mkomarin...@wayga.org wrote on 09/17/2009 02:43:29 PM: On 09/17/2009 12:46 PM, bruce.lab...@autoliv.com wrote: FFTW was compiled with -m64 = 64 bit. What did you mean by Throw in the output of 'file /usr/local/lib/libfftw3.*'. ? run that command: file /usr/local/lib/libfftw3.* -Mark Oh, that's what you meant :P # file /usr/local/lib/libfftw3.* /usr/local/lib/libfftw3.a:current ar archive /usr/local/lib/libfftw3.la: ASCII English text /usr/local/lib/libfftw3.so: symbolic link to `libfftw3.so.3.2.3' /usr/local/lib/libfftw3.so.3: symbolic link to `libfftw3.so.3.2.3' /usr/local/lib/libfftw3.so.3.2.1: ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped /usr/local/lib/libfftw3.so.3.2.2: ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped /usr/local/lib/libfftw3.so.3.2.3: ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped -Bruce ** Neither the footer nor anything else in this E-mail is intended to or constitutes an brelectronic signature and/or legally binding agreement in the absence of an brexpress statement or Autoliv policy and/or procedure to the contrary.brThis E-mail and any attachments hereto are Autoliv property and may contain legally brprivileged, confidential and/or proprietary information.brThe recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way brdisseminating any material contained within this E-mail without prior written brpermission from the author. If you receive this E-mail in error, please brimmediately notify the author and delete this E-mail. Autoliv disclaims all brresponsibility and liability for the consequences of any person who fails to brabide by the terms herein. br ** ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Linux as a NAS performance questions
I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Linux as a NAS performance questions
That's basically what a Drobo (http://www.drobo.com/products/drobo.php) is, only they already considered all of those performance questions for you. --DTVZ On Thu, Sep 17, 2009 at 4:09 PM, Neil Joseph Schelly n...@jenandneil.comwrote: I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Linux as a NAS performance questions
On Thu, Sep 17, 2009 at 4:09 PM, Neil Joseph Schelly n...@jenandneil.comwrote: I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N I'm running OpenSolaris on an AMD dual core 165 cpu on a 939 motherboard with 3 GB of RAM. It keeps up with gigabit. I used to run Linux on a Dual PIII 500MHz with 512MB. It maxed out at 30 MB/s. The disks and SATA cards got put onto the current system, It doesn't really answer your question, does it? There is a threshhold for matching gigabit ethernet speed though. What's the power savings a single core will give you vs dual core? How much does your electricity cost? ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
bruce.labitt writes: Kevin D. Clark wrote on 09/17/2009 12:03:20 PM: # we define _XOPEN_SOURCE because # we define _GNU_SOURCE because # modify to suit to your situation CPPFLAGS=-D_XOPEN_SOURCE=500 -D_GNU_SOURCE where are CPPFLAGS used below? They're not ; my example relies upon GNU Make's well known implicit rules, documented here: http://www.gnu.org/software/make/manual/make.html#Catalogue-of-Rules How is CXX defined? Will this automagically select gcc for *.c and g++ for *.cpp? $ cat ~/Makefile.test all: @echo CC is $(CC) and CXX is $(CXX) $ make -f ~/Makefile.test CC is cc and CXX is g++ $ cc -v ... How can the dependencies (header files) be pulled in? That is harder to do. gcc -M might do a large part of what you are looking for. You'll need to get very adept at these things in order to make this aspect work. --kevin -- GnuPG ID: B280F24EGod, I loved that Pontiac. alumni.unh.edu!kdc-- Tom Waits http://kdc-blog.blogspot.com/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Make Q's
bruce.lab...@autoliv.com writes: There are two files that need to be compiled with gcc, and five with g++. One could set up two objects lists, OBJ1=file1.o file2.o== use gcc OBJ2=file3.o file4.o file5.o file6.o file7.o== use g++ SRC1=file1.c file2.c SRC2=file3.cpp file4.cpp file5.cpp file6.cpp file7.cpp CXX=g++ CC=gcc CCOPTS= INCLUDES= DEPS= I'm trying, quite unsucessfully, I may add, to design a rule that compiles things appropriately. Might this work? project: $(OBJS1) $(OBJ2) $(CXX) -o project $(OBJ1) $(OBJ2) $(LIBS) $(OBJ1): $(SRC1) $(DEPS) $(CC) -c $ $(CCOPTS) $(INCLUDES) $(OBJ2): $(SRC2) $(DEPS) $(CXX) -c $ $(CCOPTS) $(INCLUDES) I'm a big fan of the GNU Autotools (Automake, Autoconf, Libtool); doing it that way, you'd have something like the following two files (which you can drop into the directory with your code, and then initialise by running autoreconf --install): # This is Makefile.am: bin_PROGRAMS = project project_SOURCES = file1.c file2.c \ file3.cpp file4.cpp file5.cpp file6.cpp file7.cpp # (NOTE: project_SOURCES should also include # any corresponding header-files) project_LDADD = -lfftw3 # ... since I hear you're using that... # This is configure.ac (usually drafted by running autoscan): AC_PREREQ([2.59]) AC_INIT([bl-project], [0.1], [bruce.lab...@autoliv.com]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) LT_INIT AC_PROG_CC AC_PROG_CXX AC_CONFIG_SRCDIR([1.c]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Linux as a NAS performance questions
On Thu, Sep 17, 2009 at 4:09 PM, Neil Joseph Schelly n...@jenandneil.comwrote: I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ Any modern processor will be bored for these services, even if you use an encrypted and compressed file system. Single core will be plenty, but I don't know how much it will save you on power. Focus first on low power design and then on number of cores. You may find some multi-cores do better then some singles. The Intel Atom is probably your best bet and should still have plenty of spare processing power. OK, so MAYBE and Atom won't keep up with GigE if you use compression and encryption. It probably depends on the compression and encryption algorithms. I don't really know, but I bet you will be fine. Disk IO and then network are going to be your bottlenecks. More RAM will help disk IO via the OS's disk cache depending on the usage patterns of the data store, but most NAS appliances only have a couple hundred MB if you are lucky. If you are just using it for backups for steaming media, you can run very happily with as little as 64MB (assuming no GUI), but you may need more than that just to install the OS, depending on the distro. Higher RPM on disks will of course help IO, but not the power consumption. SSD will help both, but not your wallet. I like the Western Digital Green drives for this purpose as the only spin at 5400 RPM when they can get away with it and jump to 7200 RPM when the demand requires it. Compression will also help disk IO in most cases, and if you expect a lot of concurrent requests, play around with ionice on some of your NAS services. BTW, you might want to check out the FreeNAS project. From what I understand, there is nothing in there you can't get in another distro, but they keep it pretty lean while providing all the services you mentioned on a fresh install. Don't take my word for it though. It has been while since I looked into it. Ubuntu Server does a very lean install as well. Not quite as lean as Debian (and others), but even at the command line, I find Ubuntu is more friendly. I think there might have been a file server option on the Jaunty Server installer, but I don't pay much attention to such things as I like to to a bare install on a Server and pick the packges I want myself. Definitely a Samba option at install, but again, you might bet more than you need or want that way. SSH is a good option at install. You might also consider webmin if you are not hardcore on the command line. It will ask you if you want to install the relevant packages if it can't find a service when you access the module, so it makes a nice add on to a bare Ubuntu Server install. To install, use dpkg -i webmin*.deb then do an apt-get -f install when dpkg fails and apt-get will go fetch the dependancies and finish up the webmin install. Once webmin is running, you need not the command line any more. I have also heard very good things about ebox (Ubuntu only last I knew) but I have not been able to access it on my home server yet because the browser is puking on the cert for some reason and I have not cared to fight with it yet. That's my $1.37 (2 cents with inflation). -- Alan Johnson a...@datdec.com ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Linux as a NAS performance questions
On Thu, 2009-09-17 at 17:59 -0400, Alan Johnson wrote: On Thu, Sep 17, 2009 at 4:09 PM, Neil Joseph Schelly n...@jenandneil.com wrote: I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ Any modern processor will be bored for these services, even if you use an encrypted and compressed file system. Single core will be plenty, but I don't know how much it will save you on power. Focus first on low power design and then on number of cores. You may find some multi-cores do better then some singles. The Intel Atom is probably your best bet and should still have plenty of spare processing power. OK, so MAYBE and Atom won't keep up with GigE if you use compression and encryption. It probably depends on the compression and encryption algorithms. I don't really know, but I bet you will be fine. Disk IO and then network are going to be your bottlenecks. More RAM will help disk IO via the OS's disk cache depending on the usage patterns of the data store, but most NAS appliances only have a couple hundred MB if you are lucky. If you are just using it for backups for steaming media, you can run very happily with as little as 64MB (assuming no GUI), but you may need more than that just to install the OS, depending on the distro. Higher RPM on disks will of course help IO, but not the power consumption. SSD will help both, but not your wallet. I like the Western Digital Green drives for this purpose as the only spin at 5400 RPM when they can get away with it and jump to 7200 RPM when the demand requires it. Compression will also help disk IO in most cases, and if you expect a lot of concurrent requests, play around with ionice on some of your NAS services. BTW, you might want to check out the FreeNAS project. From what I understand, there is nothing in there you can't get in another distro, but they keep it pretty lean while providing all the services you mentioned on a fresh install. Don't take my word for it though. It has been while since I looked into it. Ubuntu Server does a very lean install as well. Not quite as lean as Debian (and others), but even at the command line, I find Ubuntu is more friendly. I think there might have been a file server option on the Jaunty Server installer, but I don't pay much attention to such things as I like to to a bare install on a Server and pick the packges I want myself. Definitely a Samba option at install, but again, you might bet more than you need or want that way. SSH is a good option at install. You might also consider webmin if you are not hardcore on the command line. It will ask you if you want to install the relevant packages if it can't find a service when you access the module, so it makes a nice add on to a bare Ubuntu Server install. To install, use dpkg -i webmin*.deb then do an apt-get -f install when dpkg fails and apt-get will go fetch the dependancies and finish up the webmin install. Once webmin is running, you need not the command line any more. I have also heard very good things about ebox (Ubuntu only last I knew) but I have not been able to access it on my home server yet because the browser is puking on the cert for some reason and I have not cared to fight with it yet. That's my $1.37 (2 cents with inflation). -- Alan Johnson a...@datdec.com ___
Re: Linux as a NAS performance questions
On Thursday 17 September 2009 05:59:34 pm Alan Johnson wrote: Any modern processor will be bored for these services, even if you use an encrypted and compressed file system. Single core will be plenty, but I don't know how much it will save you on power. Single-core processor: $40 (35W) http://www.newegg.com/Product/Product.aspx?Item=N82E16819116039 Dual-core processor: $50 (65W) http://www.newegg.com/Product/Product.aspx?Item=N82E16819116075 30W is decent savings. Ubuntu Server does a very lean install as well. Not quite as lean as Debian (and others), but even at the command line, I find Ubuntu is more friendly. I'm a Debian guy. It's my intent to build it with Debian rather than a specific NAS distro. I prefer turning Debian boxes into what I want than letting someone else do it for me. Thanks... -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: Linux as a NAS performance questions
Drew Van Zandt wrote: That's basically what a Drobo (http://www.drobo.com/products/drobo.php) is, only they already considered all of those performance questions for you. --DTVZ On Thu, Sep 17, 2009 at 4:09 PM, Neil Joseph Schelly n...@jenandneil.com mailto:n...@jenandneil.com wrote: I'm looking to build a small Shuttle barebone machine into a NAS running Linux. The intent of the machine is to be a networked PC with lots of storage in a RAID array, made available over the gigabit network interface via Samba, NFS, and maybe iSCSI protocols. I'm curious what experience others have with this sort of stuff in general, but two immediate questions come to mind about processor and memory performance. I can go the low-power, low-heat route and get a single-core processor and a single memory stick of minimal quantity. Or I can upgrade a bit, get a dual-core processor with 2 sticks of dual-channel memory. Or something in between. What I don't know is how much impact processor speed, multiple cores, memory capacity, and dual-channel memory has on disk I/O, network I/O, software RAID processing, etc. I like the idea of a small low-power, low-heat appliance, but will going too low on those negatively impact performance much? The cost difference between a single-core processor with 1GB of memory and a dual-core processor with 2 sticks of 1GB dual-channel memory is insignificant, so that's not much of a concern. -N ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org mailto:gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/ There seem to be a lot of unhappy Drobo users if Newegg's customer reviews are anything to go buy. Take a look here: http://www.newegg.com/Product/Product.aspx?Item=N82E16822240010 I have learned the hard way to be very mindful of the customer reviews on Newegg. If the unhappy customers get to the 20% or higher level you need to make sure their complaints don't apply to your situation. -Alex ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
CALL FOR HELP: Software Freedom Day THIS SATURDAY in Manchester!
What: Software Freedom Day Who: *YOU* Where: Pulaski Park, Manchester, NH Date: Saturday, September 19th, 2009 Time: Flexible, overall roughly 10 AM to 5 PM We need volunteers for Software Freedom Day this Saturday! Most of all, we need people to show up and talk to other people. You can talk about what Software Freedom is and why it's important, or you can talk about your favorite programs and why they rock. This isn't a Linux-only love-fest -- Free Software running on MS Windows, Mac OS X, or a BSD is equally welcome! It can Firefox, or OpenOffice, or GIMP, or whatever. Free Content music/books are great, too! We also need equipment and materials, although they're secondary to people. Things we need in any quantity: * Tables * Chairs * Tents/pavilions * Discs full of Free Software/Content to give away * Laptops running Free Software for demo purposes * SWAG -- stickers, T-shirts, button-pins, etc. * Stuff to attract attention I know we have some Red Hat people in the area. Come on by with a pile of Fedora discs! You don't want the Ubuntu people stealing all the limelight, do you? FSF, EFF, Mozilla, Debian, Python and any and all other projects are welcome too, of course! We've got SFD balloons and I plan on buying one of those DIY helium tank kits. I'll also be printing a bunch of single-page flyers with GNHLUG info on them. Anything else you can think of is great. Signs, banners, flags, bumper stickers, shirt stickers, giant stuffed Tux plush, whatever. More ambitious suggests include: Face painting or masks (penguin beaks, fox ears, etc.). Carnival-style attractions (popcorn or snow-cones, or simple games). Feel free to just show up! If you want, you can let us know in advance -- that way we can pretend we know what's going on. You can reply on-list to this message, or privately off-list to me, or sign-up on the SFD website (see links below), or send a flash drive taped to a carrier pigeon. Arc Riley is the lead for this, but he's suffering from a bad case of Real Life(TM) and asked me to help him coordinate things. === LOCATION === Pulaski Park is on Bridge Street in Manchester. About a block east from MV Communications. Lots of foot traffic and high visibility from Bridge St. We'll hopefully get between 150 and 250 people through the day, but no more than a handful at a time. http://maps.google.com/maps?q=Pulaski+Park,+Manchester,+NH The street address looks like 128 Bridge Street. Lat/lon looks to be 42.994941 North, 71.458731 West. === LINKS === http://softwarefreedomday.org/teams/northamerica/NH/Manchester https://wiki.ubuntu.com/NewHampshireTeam http://www.gnlug.org/ http://softwarefreedomday.org/ http://www.spreadfirefox.com/ ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: CALL FOR HELP: Software Freedom Day THIS SATURDAY in Manchester!
+1 :-) beaks, fox ears, etc.). Carnival-style attractions (popcorn or snow-cones, or simple games). Let's avoid food so we don't have a run-in with the health dept, and lets make absolutely clear that no money is exchanged for games/items/etc so we don't become a vendor :-) But yes! We're all excited about software freedom, this is the big day every year we have an excuse to share it with our neighbors! (( Psst - there are three bright lime green Software Freedom Day 2009 tshirts for the first three volunteers to request them. They're yours to keep as a thanks for helping make this happen courtesy softwarefreedomday.org ! )) ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
Re: CALL FOR HELP: Software Freedom Day THIS SATURDAY in Manchester!
On Fri, Sep 18, 2009 at 12:19 AM, Arc Riley arcri...@gmail.com wrote: (( Psst - there are three bright lime green Software Freedom Day 2009 tshirts for the first three volunteers to request them. I'm just looking forward to inhaling the helium ;-) -- Ben ___ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/