euglug.org

[작성자:] admin

  • [Eug-lug] How to program GNU “make”?



    walter fryTue Dec 28 15:54:52 PST 2004

    Are linux commands really this arcane?  this is scary...what does this:
    
    >    o      o     o    o     o    <o     <o>    o>    o
    >   .|.    \|.   \|/   //    X     \      |    <|    <|>
    >    /\     >\   /<    >\   /<     >\    /<     >\    /<
    
    really mean?
    
    _________________________________________________________________
    Express yourself instantly with MSN Messenger! Download today - it's FREE! 
    http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
    
    
  • [Eug-lug] How to program GNU “make”?



    Allen BrownMon Dec 27 15:09:27 PST 2004

    Thank you.  That gave me the hints I needed.
    I ended up with a rule that looked more like
    
    file1_t file2_t:  %_t:	%_t.o %.o
    		rules
    
    The reason I need this additional qualification is that the
    dependencies and rules are not quite the same for different
    target files.
    --
    Allen Brown
      work: Agilent Technologies      non-work: http://www.peak.org/~abrown/
            allen_brown at agilent.com             abrown at peak.org
       o      o     o    o     o    <o     <o>    o>    o
      .|.    \|.   \|/   //    X     \      |    <|    <|>
       /\     >\   /<    >\   /<     >\    /<     >\    /<
    
    
    
    On Mon, 27 Dec 2004, Bob Miller wrote:
    
    > Allen Brown wrote:
    > 
    > > I'm having trouble expressing a rule using GNU make.
    > > This is what I want:
    > > 
    > > file1_t file2_t:		$(@:_t=_t.o) $(@:_t=.o)
    > > 			rules to compile and test file*_t
    > > 
    > > The problem is that $(@) type constructs don't seem to work in
    > > the dependency list.  For instance
    > > 
    > > file:				$(@).o
    > > 
    > > causes make to try to create ".o" from ".c".  So evidently
    > > in the dependency list $(@) is a null string.
    > > 
    > > What is the right way to express this?
    > 
    > Take a look at Pattern Rules in the info pages.  Your example
    > should look like this.
    > 
    > 	%_t:	%_t.o %.o
    > 		@echo linking $^ into $@
    > 		$(CC) -o $@ $^
    > 	
    > 	default: file1_t file2_t ;
    > 
    > -- 
    > Bob Miller                              K<bob>
    > kbobsoft software consulting
    > http://kbobsoft.com                     kbob at jogger-egg.com
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
  • [Eug-lug] How to program GNU “make”?



    Bob MillerMon Dec 27 13:47:19 PST 2004

    Allen Brown wrote:
    
    > I'm having trouble expressing a rule using GNU make.
    > This is what I want:
    > 
    > file1_t file2_t:		$(@:_t=_t.o) $(@:_t=.o)
    > 			rules to compile and test file*_t
    > 
    > The problem is that $(@) type constructs don't seem to work in
    > the dependency list.  For instance
    > 
    > file:				$(@).o
    > 
    > causes make to try to create ".o" from ".c".  So evidently
    > in the dependency list $(@) is a null string.
    > 
    > What is the right way to express this?
    
    Take a look at Pattern Rules in the info pages.  Your example
    should look like this.
    
    	%_t:	%_t.o %.o
    		@echo linking $^ into $@
    		$(CC) -o $@ $^
    	
    	default: file1_t file2_t ;
    
    -- 
    Bob Miller                              K<bob>
    kbobsoft software consulting
    http://kbobsoft.com                     kbob at jogger-egg.com
    
  • [Eug-lug] How to program GNU “make”?



    Allen BrownSun Dec 26 21:03:49 PST 2004

    I'm having trouble expressing a rule using GNU make.
    This is what I want:
    
    file1_t file2_t:		$(@:_t=_t.o) $(@:_t=.o)
    			rules to compile and test file*_t
    
    The problem is that $(@) type constructs don't seem to work in
    the dependency list.  For instance
    
    file:				$(@).o
    
    causes make to try to create ".o" from ".c".  So evidently
    in the dependency list $(@) is a null string.
    
    What is the right way to express this?
    --
    Allen Brown
      work: Agilent Technologies      non-work: http://www.peak.org/~abrown/
            allen_brown at agilent.com             abrown at peak.org
      If it's true that we're all here to help others,
      then what exactly are the OTHERS here for?
    
    
  • [Eug-lug] Re: Filters: It seems NeoOffice imports…



    Harald SundtFri Dec 24 21:01:26 PST 2004

    ...my WordPerfect Mac OS 9.2 WP 3.e files. My novel sized files.
    
    NeoOffice is the new Mac OS X version of Star Office or Open Office.
    
    I just "open" the file and after a little chewing it appears.
    
    This may just be the cross platform Word processor that can at least 
    carry my Word Perfect files, (several hundred) across the Abyss.
    
    I haven't checked all the details,... I am hopeful.
    
    Hal (Leo Rivers)
    www.efn.org/~l_rivers/
    
    
    See Below:
    
    NeoOffice
    www.planamesa.com/neojava/en/index.php
    
      Neolithic Office for JavaTM, or NeoOffice/J for short. NeoOffice/J 
    is a reasonably stable version of the OpenOffice.org office suite 
    that has been engineered to run natively on Mac OS X. It is open 
    source software released under the GNU General Public License (GPL) 
    and is available for free from the NeoOffice/J download page.
    
    -- 
    WAR IS PEACE - FREEDOM IS SLAVERY - IGNORANCE IS STRENGTH
    
  • [Eug-lug] I can burn NeoOffice for Mac OS X to disk



    Harald SundtFri Dec 24 18:54:48 PST 2004

    If anyone would like it.
    
    I would like to attend the next meeting if I can find out where and 
    when in time.
    
    Hal
    -- 
    WAR IS PEACE - FREEDOM IS SLAVERY - IGNORANCE IS STRENGTH
    
  • [Eug-lug] I’m having a “little” trouble getting MySQL going



    horstFri Dec 24 16:30:42 PST 2004

    Sorry, I didn't look at your detailed config changes, BUT
      a *.pid file often signals to the *deamon (*d in ps -ef) that a 
    process is running with the ID of the content of the *.pid file.
    The *.pid file usually contains the 16bit PID (nothing in it 
    doesn't sound right, 'not right' as in buggy --I trust what you said)
    A civilized shutdown of a deamon usually removes the *.pid file.
    
    Just try to remove the *.pid file and restart mysqld.
    
    Is there a -v or --verbose, or debug option to get get more feedback when 
    it fails?
    
    Hippie Holidays...................... Horst
    
    
    > Date: Fri, 24 Dec 2004 16:03:43 -0800
    > From: Zeb Packard <cyphercell_4 at hotmail.com>
    > Subject: [Eug-lug] I'm having a "little" trouble getting MySQL going
    > 
    >
    > Hey I'm having problems getting mysql started on slackware.
    > First I had a problem with the preinstalled version so I
    > uninstalled it and reinstalled mysql 4.1.8 figuring starting
    > from the begining might help. It sure seemed like it was going
    > to be better this time but when I run:
    >
    > bash-2.05b# ./bin/mysqld_safe
    >
    > I get this:
    > Starting mysqld daemon with databases from /mysql/data
    > STOPPING server from pid file /mysql/data/ninjaz.pid
    > 041224 14:42:49  mysqld ended
    >
    > I looked at my pid file and there is nothing in there. If that means 
    > anything.
    ...
    
  • [Eug-lug] I’m having a “little” trouble getting MySQL going



    Zeb PackardFri Dec 24 16:03:43 PST 2004

    Hey I'm having problems getting mysql started on slackware.
    First I had a problem with the preinstalled version so I
    uninstalled it and reinstalled mysql 4.1.8 figuring starting
    from the begining might help. It sure seemed like it was going
    to be better this time but when I run:
    
    bash-2.05b# ./bin/mysqld_safe
    
    I get this:
    Starting mysqld daemon with databases from /mysql/data
    STOPPING server from pid file /mysql/data/ninjaz.pid
    041224 14:42:49  mysqld ended
    
    I looked at my pid file and there is nothing in there. If that means 
    anything.
    
    when I looked at my .err file this is what I see
    
    041224 14:42:49  mysqld started
    041224 14:42:49 [Warning] Asked for 196608 thread stack, but got 126976
    041224 14:42:49 [ERROR] Can't start server : Bind on unix socket: No such 
    file or directory
    041224 14:42:49 [ERROR] Do you already have another mysqld server running on 
    socket: /var/run/mysql/mysql.sock ?
    041224 14:42:49 [ERROR] Aborting
    
    041224 14:42:49 [Note] /mysql/bin/mysqld: Shutdown complete
    
    041224 14:42:49  mysqld ended
    
    /var/run/ ----is where I mysql was originally installed
    
    I have recently edited my rc.mysqld file to reflect the locations of all my 
    new files
    this is what it looks like
    
    #!/bin/sh
    # Start/stop/restart mysqld.
    #
    # Copyright 2003 Patrick J. Volkerding, Concord, CA
    # Copyright 2003 Slackware Linux, Inc., Concord, CA
    #
    # This program comes with NO WARRANTY, to the extent permitted by law.
    # You may redistribute copies of this program under the terms of the
    # GNU General Public License.
    
    # To start MySQL automatically at boot, be sure this script is executable:
    # chmod 755 /etc/rc.d/rc.mysqld
    
    # Before you can run MySQL, you must have a database.  To install an initial
    # database, do this as root:
    #
    #   su - mysql
    #   mysql_install_db
    #
    # Note that step one is becoming the mysql user.  It's important to do this
    # before making any changes to the database, or mysqld won't be able to 
    write
    # to it later (this can be fixed with 'chown -R mysql.mysql 
    /var/lib/mysql').
    
    # To disallow outside connections to the database (if you don't need them, 
    this
    # is recommended to increase security), uncomment the next line:
    #SKIP="--skip-networking"
    
    # Start mysqld:
    mysqld_start() {
      if [ -x /mysql/bin/mysqld_safe ]; then
        # If there is an old PID file (no mysqld running), clean it up:
        if [ -r /mysql/data/ninjaz.pid ]; then
          if ! ps ax | grep mysqld 1> /dev/null 2> /dev/null ; then
            echo "Cleaning up old /mysql/data/ninjaz.pid."
            rm -f /mysql/data/ninjaz.pid
          fi
        fi
        /mysql/bin/mysqld_safe --datadir=/mysql/data 
    --pid-file=/mysql/data/ninjaz.pid $SKIP &
      fi
    }
    
    # Stop mysqld:
    mysqld_stop() {
      # If there is no PID file, ignore this request...
      if [ -r /mysql/data/ninjaz.pid ]; then
        killall mysqld
        # Wait at least one minute for it to exit, as we don't know how big the 
    DB is...
        for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 
    9 \
          0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
          if [ ! -r /mysql/data/ninjaz.pid ]; then
            break;
          fi
          sleep 1
        done
        if [ "$second" = "60" ]; then
          echo "WARNING:  Gave up waiting for mysqld to exit!"
          sleep 15
        fi
      fi
    }
    
    # Restart mysqld:
    mysqld_restart() {
      mysqld_stop
      mysqld_start
    }
    
    case "$1" in
    'start')
      mysqld_start
      ;;
    'stop')
      mysqld_stop
      ;;
    'restart')
      mysqld_restart
      ;;
    *)
      echo "usage $0 start|stop|restart"
    esac
    
    _________________________________________________________________
    Express yourself instantly with MSN Messenger! Download today - it's FREE! 
    http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
    
    
  • [Eug-lug] Re: Walter’s… // improv commnctn



    horstFri Dec 24 15:38:46 PST 2004

    > Date: Fri, 24 Dec 2004 10:45:11 -0800 (PST)
    > From: horst <horsu at freeshell.org>
    > Subject: [Eug-lug] Re: Walter's serv.req/o.office
    > 
    >> Date: Fri, 24 Dec 2004 02:23:49 +0000
    >> From: walter fry <kd7kpa at hotmail.com>
    
    Let me add more info for the purpose of re-evaluating points of reference:
    
    I met Walter and his laptop at the 'Deutscher Stammtisch' (that's where I 
    fixed the floppy mount issue). Walter is about 1.5 generations ahead of 
    the average EugLUG member. He has many talents, and attacked and solved a 
    variety of technical problems in his long professional life (micro 
    processors,...youNameIt..., and non-electronic subjects).
    He is just not (yet) familiar with Linux/Unix.
    
    To improve communication I suggest
    ----------------------------------
    Walter: add short *text* clips of your input and the OS/shell response to 
    your questions.
    LUG: don't just throw in a link or command --say why you are doing what, 
    and how Walter can explore the subject, e.g. man page, cmd options, ...
    
    For example: Walter, if you like to see what I did to get the floppy 
    mounted:
      su -
       (that gets you into the root environment; enter 'man su' to see
        documentation; use 'q' to quit the 'man' (=manual) environment)
      history > floppy-issues.txt
       (that creates a file of the previous 500(more or less) root commands;
        the ' > ' means redirect screen output to file, like in DOS)
      less floppy-issues.txt
       (that lets you view the history; <space-key> to forward; <h enter> for
        help with other commands; 'q' to quit)
      There are various ways of cleaning up (editing) the file 
    'floppy-issues.txt' ; 'pico' may be the easiest to begin with --what 
    happens if you enter 'pico floppy-issues.txt' ?
    
    Another subject:
    ----------------
    I used the 'script fileName' command to document what I did on your 
    laptop; since I also used 'vi' during the session the 'fileName' is full 
    of control characters and hard to read. You can use
      cat fileName | col -b > fileName.clean.txt
    where 'fileName' is the name I used, but forgot.
    ((what's going on in that one line is the subject of another tutorial:
      4 Unix 'thingies' as compact as it gets: 'cat', 'col', ' | ' (=pipe), ' > ' (=redirect)
      It's a bit like slapping a bunch of 74xx TTL gates together --the input 
    of the next gate understands the output of the previous gate; the limit is 
    your imagination... and the resources of your box :-))
    
    Hippie Holidays.................... Horst
    
    
    
  • [Eug-lug] Re: Walter’s serv.req/o.office



    horstFri Dec 24 10:45:11 PST 2004

    > Date: Fri, 24 Dec 2004 02:23:49 +0000
    > From: walter fry <kd7kpa at hotmail.com>
    ..> 
    > my.in =>   -ls -ld /home/walter
    > sys.out=>  -ls not found
    > myin =>  mkdir /home/walter/.rhoffice1.1/user/backup/usb
    > sysout=> cannot create dir. file exists
    >     but the ooffice progm still can not save to the disk.  I dont want to be 
    > a burden ,,,but noone else is interested it seems , , ,is there any where i
    
    Walter, you are OK asking those questions.
    One purpose of a LUG is to provide support, including for beginners.
    
    In my original post I said
    """""""""""""""""""""""""""""""
    Date: Sun, 19 Dec 2004 15:05:32 -0800 (PST)
    From: horst <horsu at freeshell.org>
    Subject: Re: [Eug-lug] OpenOffice backup path // wa: thanks for you'r help 
    horst
    
    As user 'walter':
    
    a) Try to see where the path breaks.
             ls -ld  /home/walter            (should work)
             ls -ld  /home/walter/.rhopenoffice1.1
             ls -ld  /home/walter/.rhopenoffice1.1/user
             ...etc.
        do this until you have confirmed the default path reported by 
    openoffice .
    """""""""""""""""""""""""""""""
    As others pointed out: (the single 'quotes' below are not to be entered)
       'ls' is the command to list your file system (no leading '-')
       commands in Unix are often followed by options, then by arguments
         under DOS options are often called switches
         short options begin with 1 dash '-'
           short options can be aggregated, here '-ld'
         long options begin with 2 '--' followed immediately by a keyword
       option '-l' gives you a long listing
         this shows permissions and ownership --if you post the results people
         may be able to see what's wrong.
       option '-d' prevents 'ls' from listing the content of directories (to
         reduce clutter on your screen)
       option '-h' (human readible output) is not supported on all distros.
    
    Now, as indicated by
    > sysout=> cannot create dir. file exists
    the path is there, but we don't know about permissions and ownership.
    If you login as walter and issue
      touch /home/walter/.rhoffice1.1/user/backup/usb/touch-test
    and you don't get an error message it proves that you can write to that
    directory. To see you can read and list it, enter
      ls -l /home/walter/.rhoffice1.1/user/backup/usb/
    
    If you still have problems with OpenOffice that then indicates that 
    something is wrong with OpOff (configuration?).
    
      - Horst, back in a couple of days.