gnupic: Confirmation 'ebs_cc' runs under Red Hat 7.1


Previous by date: 23 Dec 2001 20:04:12 -0000 Re: Confirmation 'ebs_cc' runs under Red Hat 7.1, Scott Dattalo
Next by date: 23 Dec 2001 20:04:12 -0000 Pain with GPSIM, Mohamed Eldesoky
Previous in thread: 23 Dec 2001 20:04:12 -0000 Re: Confirmation 'ebs_cc' runs under Red Hat 7.1, Scott Dattalo
Next in thread:

Subject: Re: Confirmation 'ebs_cc' runs under Red Hat 7.1
From: tma ####@####.####
Date: 23 Dec 2001 20:04:12 -0000
Message-Id: <3C26385F.4050900@island.net>

Greetings Scott:

	Many thanks for your comments. I learned a lot from them and especially 
like your idea of using the 'G' symbolic link! It eliminates the need to 
modify the PATH environment and makes 'gsim' just a single keystroke away!

	 I am a single user adjusting to this multi-user software, (:/). 
Installing under the user's home directory makes a lot of sense to me 
but makes me wonder what the intent of the /opt directory is in the 
overall file organization plan. My present understanding is that the 
/opt directory is intended for application software not related to the 
operating system. I wonder if it is supposed to be limited to non system 
related applications intended for multi-user access? The /opt directory 
is completely empty after the initial installation of RH 7.1 which made 
me think of it as a pristine location to segregate my applications from 
everything else. However it does not offer the advantage of establishing 
user ownership as you have done by using the 'home' directory path.

	Certainly if I were to want to run a Unix type application on my ISP's 
machine I would have to install it under my user account directory. Thus 
installing the ebs package under your ~/ as you have done seems to be 
more consistent with what is done on larger systems.

	Many thanks for your instructive support!

Tom Alldread

Scott Dattalo wrote:

> On Sat, 22 Dec 2001, tma wrote:
> 
> 
>>Greetings:
>>
>>           Thanks to those for replying to my question about running the
>>'ebs_cc' compiler under RH 7r1. With the confidence that it should run
>>OK I decided to give it a try and now I am pleased to say I have it running.
>>
> 
> 
> <snip>
> 
> Tom,
> 
> This example is instructive to new users,.  Let me add a coupld of
> comments that may help out.
> 
> 
> 
>>
>>=========================================================================
>>
>>The procedure I followed for the installation was as follows:
>>
>>1)  Starting in the '/opt' directory with the KDE File Manager I
>>sequentially created the subdirectory branch titled '/opt/pic/c/ebs/bin'
>>to provide unique locations for the 'ebs_cc' files.
>>
> 
> In general, you should place tar balls such as these in a directory off of
> your home directory. I put of my PIC stuff in ~/gnupic/. (The ~ is a short
> cut way of expressing the path to your home directory.)
> 
>  >
> 
>>2) I moved the ebs_cc.tar.gz download file into the 'ebs' subdirectory.
>>
>>Note: The following commands (given in steps 3-6 below) were ran within
>>a 'bash' shell terminal session from the 'ebs' directory prompt.
>>
>>3) I ran 'gunzip ebs_cc.tar.gz' which created the 'ebs_cc.tar' file
>>without any error reports.
>>
>>
>>4) I ran 'tar -xvf ebs_cc.tar' which extracted the 'ebs_cc' files and
>>placed them in the 'ebs' subdirectory.
>>
> 
> In the future, you can gunzip and tar in one step:
> 
> tar -xvzf ebs_cc.tar.gz
> 
> Note that the 'v' means verbose and will list the files as they're
> extracted.
> 
> 
>>
>>5) I ran 'make' which produced the following 'gcc' compiler report:
>>
>>gcc -Daux -g -o mypicc main.o codepic.o expr.o function.o sym.o stmt.o
>>while.o gen.o error.o io.o lex.o primary.o preproc.o data.o
>>
>>6) I ran 'dir' which provided the following files list:
>>
>>16c84.h        ebs_cc.tar        gen.c  	main.c
>>preproc.o      sym.o             16f870.h       ee_read.c
>>gen.o          main.o            mary.c         test0.c
>>16f87x.h       ee_write.c        getchar.c      Makefile
>>primary.o      test.c            codepic.c      error.c
>>glibpic.h      Readme            while.c        codepic.o
>>error.o        io.c              mlibpic.h      rtest.c
>>while.o        data.c            expr.c         io.o
>>mypicc         slibpic.h         data.h         expr.o
>>lcd_lib.c      P16FXXX.inc       stdio.h        data.o
>>lex.c          pic_io.c          stmt.c         defs.h
>>function.c     lex.o             pic_temp.c     stmt.o
>>function.o     libpic.h          preproc.c      sym.c
>>
>>7) I moved the 'mypicc' executable file to the previously created
>>'/opt/pic/c/ebs/bin' subdirectory.
>>
>>Note: The following commands (given in steps 7-11 below) were ran within
>>a 'bash' shell terminal session from the 'bin' directory prompt.
>>
>>8)  I ran 'file mypicc' from the 'bin' directory prompt and got the
>>following report:
>>
>>mypicc: ELF 32-bit LSB executable, Intel 80386, version 1,
>>dynamically linked (uses shared libs), not stripped
>>
>>
>>9) I then tried to run 'mypicc' from the 'bin' subdirectory and got the
>>following bash unknown path report:
>>
>>bash: mypicc: command not found
>>
> 
> Rather than polluting my path variable, I typically will place a symbolic
> link in ~/bin/ (which should be in your path). For example, in gpsim
> development I often test the program before installing it. The executable
> after the make is located in ~/gnupic/gpsim/gpsim/ and is called gpsim. So
> I do this:
> 
> cd ~/bin
> ln -s /home/scott/gnupic/gpsim/gpsim/gpsim g
> 
> The 'ln' means link, and the -s means symbolic. Now I can type 'g' and run
> the newly built copy of gpsim.
> <snip>
> 
>>======================================================================
>>
>>           If anyone spots a problem or has suggested improvements for
>>this procedure please send me an email directly and/or post some
>>feedback on this mailing list.
>>
>>	My confidence is low about step 11 as I went back and found I could run
>>'mypicc' without the './' prefix with the '.bash_profile' file deleted.
>>The following questions come to mind:
>>
>>	a) I wonder if 'opt/pic/c/ebs/bin' should be appended to the  PATH
>>statement within the .bash_profile file in the user's HOME directory?
>>
> 
> I wouldn't do it.
> 
> 
>>	b) Is it OK to create a .bash_profile file with a new PATH statement in
>>the 'bin' containing the 'mypicc' executable file?
>>
> 
> Sure.
> 
> 
>>	c) I wonder why the './' prefix was needed although I was already at the
>>'bin' prompt where 'mypicc' is located? This seems to differ from DOS
>>where one can execute a file without the need to specify the path when
>>launching from the subdirectory containing the file to be executed.
>>
> 
> Chances are the path was not what you expected.
> 
> 
>>	d) Does the use of the /opt directory for my PIC software comply with the
>>Linux directory structure plan?
>>
> 
> Right now, the RPMs get installed in /usr/share while the tarballs get
> installed in user /usr/local (by default).
> 
> 
> Thanks for taking the time to go through all of this Tom.
> 
> BTW, If you got ebs_cc working and you're really happy, and you really
> want to stay in the holiday spirit, then don't look at the code it
> generates. I promise it will make you spew turkey all over your keyboard!
> 
> Scott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 
> 
> 



Previous by date: 23 Dec 2001 20:04:12 -0000 Re: Confirmation 'ebs_cc' runs under Red Hat 7.1, Scott Dattalo
Next by date: 23 Dec 2001 20:04:12 -0000 Pain with GPSIM, Mohamed Eldesoky
Previous in thread: 23 Dec 2001 20:04:12 -0000 Re: Confirmation 'ebs_cc' runs under Red Hat 7.1, Scott Dattalo
Next in thread:


Powered by ezmlm-browse 0.20.