Building and running new package versions not yet in ports?

2010-08-13 Thread Thomas Mueller
What do I do if I want to build and run a package where version in ports 
collection is not up-to-date, and I want to build and run the current release 
version of that package, like Abiword 2.8.6 for instance, when version in ports 
is behind?  Or maybe I want to try a new alpha or beta development release of a 
package like Firefox or Seamonkey, but don't want to burn my bridges on the 
already installed and running version.

Can I create a testing install base such as /extra or /usr/extra, and set 
something like
PATH=/usr/extra/bin:$PATH
and perhaps modify some other environment variables, and then be able to return 
to the regular environment?  I would only want to change a few things 
temporarily and would not want to create an entire chroot system.   

Is this the proper list for this question, or should I have posted to 
freebsd-po...@freebsd.org ?

Tom

___
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: Building and running new package versions not yet in ports?

2010-08-13 Thread Matthew Seaman
On 13/08/2010 07:44, Thomas Mueller wrote:
 What do I do if I want to build and run a package where version in
 ports collection is not up-to-date, and I want to build and run the
 current release version of that package, like Abiword 2.8.6 for
 instance, when version in ports is behind? Or maybe I want to try a new
 alpha or beta development release of a package like Firefox or
 Seamonkey, but don't want to burn my bridges on the already installed
 and running version.

Contact the port maintainers in the first instance -- they may well have
beta test versions of the ports you can download.  Failing that, it is
perfectly feasible for you to update a port yourself.

Generally, you will want to work on a copy of the port directory
somewhere.  You can check out what you need from anonymous CVS, which
gives you all the extra VCS goodness you could want for serious code
hacking.  Your working directory doesn't have to be anywhere special in
relation to the ports tree.  Anywhere you like will be fine.  Well,
assuming the port you're working on is pretty much stand alone -- if you
need to look at a collection of highly interconnected ports then it gets
harder, but that's not something particularly common.

Refer to the Porter's Handbook for a guide on how it all should work,
and read the comments and code in /usr/ports/Mk/*.mk for the
nitty-gritty details.  Ion-Mihail's guide at
http://ionut.tetcu.info/FreeBSD/How-to-submit-a-diff.txt has plenty of
good tips too.

If you do generate a usable upgrade for a port, please submit it as a PR
so the rest of the world can benefit.  Beware though: thus begins the
slippery path to port maintainership and possibly even a coveted
@freebsd.org e-mail address.

 Can I create a testing install base such as /extra or /usr/extra,
 and set something like
 PATH=/usr/extra/bin:$PATH and perhaps modify some other environment
 variables, and then be able to return to the regular environment? I
 would only want to change a few things temporarily and would not want
 to create an entire chroot system.

Sure.  When testing ports, I regularly have the following set in the
environment:

setenv WRKDIRPREFIX ${HOME}/tmp/ports
setenv PKG_DBDIR${HOME}/tmp/db/pkgs
setenv PORT_DBDIR   ${HOME}/tmp/db/ports
setenv PREFIX   ${HOME}/tmp/local
setenv INSTALL_AS_USER  yes
setenv NOCLEANDEPENDS   yes
setenv PACKAGES ${HOME}/tmp/packages

 Is this the proper list for this question, or should I have posted
 to freebsd-po...@freebsd.org ?

You're more likely to find interested and knowledgeable people on
freebsd-ports@ -- certainly post there if you run into difficulties
trying to work with ports.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Telnet = servname ai_socktype error

2010-08-13 Thread Ashish SHUKLA
jaymax  writes:

[...]


 % telnet 0 smtp
   0: servname not supported for ai_socktype

What according to you 0 is ?

-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

“There was truth and there was untruth, and if you clung to the truth
even against the whole world, you were not mad.” (George Orwell,
Nineteen Eighty-Four, 1949)


pgpKEegDH76yS.pgp
Description: PGP signature


Re: Grepping a list of words

2010-08-13 Thread Jack L. Stone
At 10:56 AM 8.12.2010 -0700, Chip Camden wrote:
Quoth Anonymous on Thursday, 12 August 2010:
 Oliver Fromme o...@lurza.secnetix.de writes:
 
  John Levine jo...@iecc.com wrote:
  % egrep 'word1|word2|word3|...|wordn' filename.txt

 Thanks for the replies. This suggestion won't do the job as the
list of
 words is very long, maybe 50-60. This is why I asked how to place
them all
 in a file. One reply dealt with using a file with egrep. I'll try
that.

Gee, 50 words, that's about a 300 character pattern, that's not a
problem
for any shell or version of grep I know.

But reading the words from a file is equivalent and as you note most
likely easier to do.
 
  The question is what is more efficient.  This might be
  important if that kind of grep command is run very often
  by a script, or if it's run on very large files.
 
  My guess is that one large regular expression is more
  efficient than many small ones.  But I haven't done real
  benchmarks to prove this.
 
 BTW, not using regular expressions is even more efficient, e.g.
 
   $ fgrep -f /usr/share/dict/words /etc/group
 
 When using egrep(1) it takes considerably more time and memory.

Having written a regex engine myself, I can see why.  Though I'm sure
egrep is highly optimized, even the most optimized DFA table is going to
take more
cycles to navigate than a simple string comparison.  Not to mention the
initial overhead of parsing the regex and building that table.

-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F

Many thanks to all of the suggestions. I found this worked very well,
ignoring concerns about use of resources:

egrep -i -o -w -f word.file main.file

The only thing it didn't do for me was the next step. My final objective
was to really determine the words in the word.file that were not in the
main.file. I figured finding matches would be easy and then could then
run a sort|uniq comparison to determine the new words not yet in the
main.file.

Since I will have a need to run this check frequently, any suggestions for
a better approach are welcome.

Thanks again...

Jack

(^_^)
Happy trails,
Jack L. Stone

System Admin
Sage-american
___
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: Grepping a list of words

2010-08-13 Thread Jonathan McKeown
On Friday 13 August 2010 15:47:38 Jack L. Stone wrote:

 The only thing it didn't do for me was the next step. My final objective
 was to really determine the words in the word.file that were not in the
 main.file. I figured finding matches would be easy and then could then
 run a sort|uniq comparison to determine the new words not yet in the
 main.file.

 Since I will have a need to run this check frequently, any suggestions for
 a better approach are welcome.

sort -u and comm(1)?

comm will compare two sorted files and produce up to three lists: of words 
only in file one, of words only in file 2 and of words common to both files. 
You can suppress any or all of the output lists.

Jonathan
___
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: Grepping a list of words

2010-08-13 Thread Jack L. Stone
At 04:01 PM 8.13.2010 +0200, Jonathan McKeown wrote:
On Friday 13 August 2010 15:47:38 Jack L. Stone wrote:

 The only thing it didn't do for me was the next step. My final objective
 was to really determine the words in the word.file that were not in the
 main.file. I figured finding matches would be easy and then could then
 run a sort|uniq comparison to determine the new words not yet in the
 main.file.

 Since I will have a need to run this check frequently, any suggestions for
 a better approach are welcome.

sort -u and comm(1)?

comm will compare two sorted files and produce up to three lists: of words 
only in file one, of words only in file 2 and of words common to both files. 
You can suppress any or all of the output lists.

Jonathan
___

Jonathan:

Thanks, I had forgotten about comm(1). Mehinks I am close to the solution
to the whole issue now.

Jack

(^_^)
Happy trails,
Jack L. Stone

System Admin
Sage-american
___
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: Building and running new package versions not yet in ports?

2010-08-13 Thread Chip Camden
Quoth Matthew Seaman on Friday, 13 August 2010:
 On 13/08/2010 07:44, Thomas Mueller wrote:
  What do I do if I want to build and run a package where version in
  ports collection is not up-to-date, and I want to build and run the
  current release version of that package, like Abiword 2.8.6 for
  instance, when version in ports is behind? Or maybe I want to try a new
  alpha or beta development release of a package like Firefox or
  Seamonkey, but don't want to burn my bridges on the already installed
  and running version.
 
 Contact the port maintainers in the first instance -- they may well have
 beta test versions of the ports you can download.  Failing that, it is
 perfectly feasible for you to update a port yourself.
 
 Generally, you will want to work on a copy of the port directory
 somewhere.  You can check out what you need from anonymous CVS, which
 gives you all the extra VCS goodness you could want for serious code
 hacking.  Your working directory doesn't have to be anywhere special in
 relation to the ports tree.  Anywhere you like will be fine.  Well,
 assuming the port you're working on is pretty much stand alone -- if you
 need to look at a collection of highly interconnected ports then it gets
 harder, but that's not something particularly common.
 
 Refer to the Porter's Handbook for a guide on how it all should work,
 and read the comments and code in /usr/ports/Mk/*.mk for the
 nitty-gritty details.  Ion-Mihail's guide at
 http://ionut.tetcu.info/FreeBSD/How-to-submit-a-diff.txt has plenty of
 good tips too.
 
 If you do generate a usable upgrade for a port, please submit it as a PR
 so the rest of the world can benefit.  Beware though: thus begins the
 slippery path to port maintainership and possibly even a coveted
 @freebsd.org e-mail address.
 
  Can I create a testing install base such as /extra or /usr/extra,
  and set something like
  PATH=/usr/extra/bin:$PATH and perhaps modify some other environment
  variables, and then be able to return to the regular environment? I
  would only want to change a few things temporarily and would not want
  to create an entire chroot system.
 
 Sure.  When testing ports, I regularly have the following set in the
 environment:
 
 setenv WRKDIRPREFIX   ${HOME}/tmp/ports
 setenv PKG_DBDIR  ${HOME}/tmp/db/pkgs
 setenv PORT_DBDIR ${HOME}/tmp/db/ports
 setenv PREFIX ${HOME}/tmp/local
 setenv INSTALL_AS_USERyes
 setenv NOCLEANDEPENDS yes
 setenv PACKAGES   ${HOME}/tmp/packages
 
  Is this the proper list for this question, or should I have posted
  to freebsd-po...@freebsd.org ?
 
 You're more likely to find interested and knowledgeable people on
 freebsd-ports@ -- certainly post there if you run into difficulties
 trying to work with ports.
 
   Cheers,
 
   Matthew
 
 -- 
 Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
   Flat 3
 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
 

That's some great information.  Thanks, Matthew.


-- 
Sterling (Chip) Camden| sterl...@camdensoftware.com | 2048D/3A978E4F
http://camdensoftware.com | http://chipstips.com| http://chipsquips.com


pgpxYbR2Xn9FE.pgp
Description: PGP signature


awk problem

2010-08-13 Thread Len Conrad
I readfile or pipe this text, in any line order:

rm90.steampick.info
fgce172.lanejive.info
smailer1.service.govdelivery.com
fl49.orangetalon.info
pollux.carespecial.info

into a program to remove subdomains down to domain.tld :

awk 'FS=. { print $(NF-1).$NF }'

and get the first line doubled rather than processed like the other lines:

rm90.steampick.info.rm90.steampick.info
lanejive.info
govdelivery.com
orangetalon.info
carespecial.info

thanks
Len

___
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


Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Yuri

I need to build 32 bit apps the same way as they would be built on i386.

When I run 64-bit gcc I get this:
gcc -m32 -o m m.c
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for 
-lgcc
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for 
-lgcc

/usr/bin/ld: cannot find -lgcc

When I run 32bit gcc I get this:
/gcc-4.5.0-32/bin/gcc -m32 -o m m.c
/var/tmp//ccif89DB.s: Assembler messages:
/var/tmp//ccif89DB.s:11: Error: suffix or operands invalid for `push'
/var/tmp//ccif89DB.s:14: Error: `-12(%ebp)' is not a valid 64 bit 
base/index expression


In first case libgcc.so isn't found, and specifying -L/usr/lib32 doesn't 
help.

In the second case 32bit compiler runs 64-bit assembler which is wrong.

Is there a documentation how to cross compile 32 bit apps on 64 bit 
platform?


Yuri

___
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: awk problem

2010-08-13 Thread Anonymous
Len Conrad lcon...@go2france.com writes:

 awk 'FS=. { print $(NF-1).$NF }'

 rm90.steampick.info.rm90.steampick.info
 lanejive.info
 govdelivery.com
 orangetalon.info
 carespecial.info

Hmm, I can't reproduce it on /head. What FreeBSD version you're using?
Can you try with lang/nawk port? nawk is from the same vendor as
/usr/src/contrib/one-true-awk.
___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Anonymous
Yuri y...@rawbw.com writes:

 I need to build 32 bit apps the same way as they would be built on i386.

 When I run 64-bit gcc I get this:
 gcc -m32 -o m m.c
 /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching
 for -lgcc
 /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching
 for -lgcc
 /usr/bin/ld: cannot find -lgcc

 When I run 32bit gcc I get this:
 /gcc-4.5.0-32/bin/gcc -m32 -o m m.c
 /var/tmp//ccif89DB.s: Assembler messages:
 /var/tmp//ccif89DB.s:11: Error: suffix or operands invalid for `push'
 /var/tmp//ccif89DB.s:14: Error: `-12(%ebp)' is not a valid 64 bit
 base/index expression

 In first case libgcc.so isn't found, and specifying -L/usr/lib32
 doesn't help.
 In the second case 32bit compiler runs 64-bit assembler which is wrong.


This was already discussed several times. I only remember recent
threads[1][2].

I've built a few ports with not many dependencies but stumbled on
unrelated issues before ever trying smth like emulators/wine.

[1] http://docs.freebsd.org/cgi/mid.cgi?201007291718.12687.tijl
[2] http://docs.freebsd.org/cgi/mid.cgi?86tyobk6bu.fsf
ftp://ftp.lissyara.su/users/Guest/cc32wrapper (improved wrapper)

 Is there a documentation how to cross compile 32 bit apps on 64 bit
 platform?

The only documented way is by using 32bit chroot.
___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Dan Nelson
In the last episode (Aug 13), Yuri said:
 I need to build 32 bit apps the same way as they would be built on i386.
 
 When I run 64-bit gcc I get this:
 gcc -m32 -o m m.c
 /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for  -lgcc
 /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for  -lgcc
 /usr/bin/ld: cannot find -lgcc
 
 When I run 32bit gcc I get this:
 /gcc-4.5.0-32/bin/gcc -m32 -o m m.c
 /var/tmp//ccif89DB.s: Assembler messages:
 /var/tmp//ccif89DB.s:11: Error: suffix or operands invalid for `push'
 /var/tmp//ccif89DB.s:14: Error: `-12(%ebp)' is not a valid 64 bit 
 base/index expression
 
 In first case libgcc.so isn't found, and specifying -L/usr/lib32 doesn't
 help.  In the second case 32bit compiler runs 64-bit assembler which is
 wrong.
 
 Is there a documentation how to cross compile 32 bit apps on 64 bit 
 platform?

Try adding -B/usr/lib32 to your first gcc line.  The specs file should be
modified to add this automatically when you pass -m32, imho.

-- 
Dan Nelson
dnel...@allantgroup.com
___
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: awk problem

2010-08-13 Thread Randal L. Schwartz
 Len == Len Conrad lcon...@go2france.com writes:

Len I readfile or pipe this text, in any line order:
Len rm90.steampick.info
Len fgce172.lanejive.info
Len smailer1.service.govdelivery.com
Len fl49.orangetalon.info
Len pollux.carespecial.info

Len into a program to remove subdomains down to domain.tld :

Len awk 'FS=. { print $(NF-1).$NF }'

Len and get the first line doubled rather than processed like the other lines:

Len rm90.steampick.info.rm90.steampick.info
Len lanejive.info
Len govdelivery.com
Len orangetalon.info
Len carespecial.info

Yes, that would be the expected behavior.

You need to set the FS *before* processing the first line.

Either use -F ., or a BEGIN block.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
___
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: awk problem

2010-08-13 Thread Len Conrad
-- Original Message --
From: Anonymous swel...@gmail.com
Date:  Fri, 13 Aug 2010 20:13:20 +0400

Len Conrad lcon...@go2france.com writes:

 awk 'FS=. { print $(NF-1).$NF }'

 rm90.steampick.info.rm90.steampick.info
 lanejive.info
 govdelivery.com
 orangetalon.info
 carespecial.info

Hmm, I can't reproduce it on /head. What FreeBSD version you're using?
Can you try with lang/nawk port? nawk is from the same vendor as
/usr/src/contrib/one-true-awk.

FreeBSD  7.0-RELEASE FreeBSD 7.0-RELEASE #0

awk --version
awk version 20070501 (FreeBSD)


___
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: awk problem

2010-08-13 Thread Anonymous
mer...@stonehenge.com (Randal L. Schwartz) writes:

 Len awk 'FS=. { print $(NF-1).$NF }'

 Len rm90.steampick.info.rm90.steampick.info
 Len lanejive.info
 Len govdelivery.com
 Len orangetalon.info
 Len carespecial.info

 Yes, that would be the expected behavior.

 You need to set the FS *before* processing the first line.

 Either use -F ., or a BEGIN block.

Then it's already fixed in 8.1-RELEASE by update in r201951.

  contrib/one-true-awk/FIXES:
Nov 26, 2009:
  fixed a long-standing issue with when FS takes effect.  a
  change to FS is now noticed immediately for subsequent splits.
___
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: awk problem

2010-08-13 Thread Mark Tinguely

Len Conrad wrote:

I readfile or pipe this text, in any line order:

rm90.steampick.info
fgce172.lanejive.info
smailer1.service.govdelivery.com
fl49.orangetalon.info
pollux.carespecial.info

into a program to remove subdomains down to domain.tld :

awk 'FS=. { print $(NF-1).$NF }'

and get the first line doubled rather than processed like the other lines:

rm90.steampick.info.rm90.steampick.info
lanejive.info
govdelivery.com
orangetalon.info
carespecial.info

thanks
Len

___
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

  


How about:

awk -F. '{ print $(NF-1).$NF }'
___
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: awk problem

2010-08-13 Thread Len Conrad
-- Original Message --
From: Mark Tinguely marktingu...@gmail.com
Date:  Fri, 13 Aug 2010 11:14:03 -0500

Len Conrad wrote:
 I readfile or pipe this text, in any line order:

 rm90.steampick.info
 fgce172.lanejive.info
 smailer1.service.govdelivery.com
 fl49.orangetalon.info
 pollux.carespecial.info

 into a program to remove subdomains down to domain.tld :

 awk 'FS=. { print $(NF-1).$NF }'

 and get the first line doubled rather than processed like the other lines:

 rm90.steampick.info.rm90.steampick.info
 lanejive.info
 govdelivery.com
 orangetalon.info
 carespecial.info

 thanks
 Len

 ___
 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

   

How about:

 awk -F. '{ print $(NF-1).$NF }'

that works, thanks

Len

___
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: UPS question

2010-08-13 Thread David Brodbeck
On Thu, August 12, 2010 8:14 pm, Al Plant wrote:
 #3. Thats why setting the bios not to self boot would work. (Stopping
 the bios from turning the server on after an outage.) Someone would have
 to check the power status manually before throwing the switch manually
 to make it come up after power has been restored.  Also turning servers
 and some desktops off and on is many cases a bad idea.

Yeah, that's why I prefaced my original misgivings by asking if this was
an unattended system.  If someone will be around to push the button,
there's no need to worry about bringing the system back up automatically. 
But if someone's going to have to drive 50 miles on a weekend to do it,
automatic start-up is a good idea. ;)

Where I work we have most of our systems set to *not* power back up after
an outage.  This is deliberate; I can't guarantee that the air
conditioners will come back on when power is restored, so I need to
manually verify that they're working before all that heat-generating
equipment is powered back on.


___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Yuri

On 08/13/2010 09:24, Dan Nelson wrote:

Try adding -B/usr/lib32 to your first gcc line.  The specs file should be
modified to add this automatically when you pass -m32, imho.
   


Thank you Dan, this flag worked.

But I found a strange discrepancy between 32bit and 64bit.
When I compile the program below in 64 bit, I get the correct result. 
With 32 bit executable compiled on 64 bit system like you suggested 
there is another (wrong) result. On 32 bit system result is also 
correct, the same as with 64 executable.


This is a very strange discrepancy. rm_eo field is zero in the match 
result which is wrong. I can't think of any explanation for it.


FreeBSD-8.1-STABLE

Yuri


--- program m.c ---
#include regex.h
#include stdio.h
#include string.h

void replace_all(char *str, char *pattern, char *replacement) {
  int res;
  int off = 0;
  regex_t re;
  regmatch_t match;

  res = regcomp(re, pattern, REG_EXTENDED);
  while (off  (int)strlen(str)  regexec(re, str+off, 1, match, 
0)==0) {
printf(match: off=%i so=%i eo=%i\n, off, (int)match.rm_so, 
(int)match.rm_eo);

off += match.rm_eo;
  }
}

main() {
  replace_all(abc-def-fghijkl, -, _);
  return 0;
}

--- output of 64 bit executable (gcc -o m m.c) ---
match: off=0 so=3 eo=4
match: off=4 so=3 eo=4

--- output of 32 bit executable built on 64 bit system with flags (gcc 
-B/usr/lib32 -m32 -o m m.c) ---

match: off=0 so=3 eo=0

___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Anonymous
Yuri y...@rawbw.com writes:

 --- output of 64 bit executable (gcc -o m m.c) ---
 match: off=0 so=3 eo=4
 match: off=4 so=3 eo=4

 --- output of 32 bit executable built on 64 bit system with flags (gcc
 -B/usr/lib32 -m32 -o m m.c) ---
 match: off=0 so=3 eo=0

I guess machine-dependent headers are involved.

  $ cc -m32 -B/usr/lib32 a.c
  $ ./a.out
  match: off=0 so=3 eo=0
  $ ln -s /usr/src/sys/i386/include machine
  $ cc -m32 -B/usr/lib32 -isystem. a.c
  $ ./a.out
  match: off=0 so=3 eo=4
  match: off=4 so=3 eo=4

Same thing is happening for mmap()
  
http://docs.freebsd.org/cgi/mid.cgi?20100524.134955.230088351175323.okuno.kohji
___
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


Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Antonio Vieiro

Hi all,

Now that OpenSolaris is dead [1] I was wondering what the status of Java 
is in FreeBSD.


I'm currently using OpenJDK16 from ports. Is OpenJDK free from Oracle 
hands or not? Would it be possible it dissappearing from the ports 
because of licensing/patent issues? If so, what are the open-source 
alternatives?


Thanks,
Antonio

[1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html
___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Yuri

On 08/13/2010 10:58, Anonymous wrote:

I guess machine-dependent headers are involved.

   $ cc -m32 -B/usr/lib32 a.c
   $ ./a.out
   match: off=0 so=3 eo=0
   $ ln -s /usr/src/sys/i386/include machine
   $ cc -m32 -B/usr/lib32 -isystem. a.c
   $ ./a.out
   match: off=0 so=3 eo=4
   match: off=4 so=3 eo=4

Same thing is happening for mmap()
   
http://docs.freebsd.org/cgi/mid.cgi?20100524.134955.230088351175323.okuno.kohji
   


But what is the general solution for this problem? Symbolic link that 
you created only exists in one local directory.


Yuri
___
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: Telnet = servname ai_socktype error

2010-08-13 Thread jaymax

telnet 0 smtp
is the same as
telnet localhost 25 
or 
telnet localhost smtp




Ashish SHUKLA-6 wrote:
 
 jaymax  writes:
 
 [...]
 
 
 % telnet 0 smtp
  0: servname not supported for ai_socktype
 
 What according to you 0 is ?
 
 -- 
 Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F
 A4B0
 freebsd.org!ashish | http://people.freebsd.org/~ashish/
 
 “There was truth and there was untruth, and if you clung to the truth
 even against the whole world, you were not mad.” (George Orwell,
 Nineteen Eighty-Four, 1949)
 
  
 

-- 
View this message in context: 
http://old.nabble.com/Telnet-%3D%3E-servname-ai_socktype-error-tp29425269p29431829.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread nux

Antonio Vieiro writes:


Hi all,

Now that OpenSolaris is dead [1] I was wondering what the status of Java 
is in FreeBSD.


But there is hope: 
http://www.h-online.com/open/news/item/Illumos-launched-as-OpenSolaris-deriv 
ative-1050151.html




I'm currently using OpenJDK16 from ports. Is OpenJDK free from Oracle 
hands or not? Would it be possible it dissappearing from the ports 
because of licensing/patent issues? If so, what are the open-source 
alternatives?


Thanks,
Antonio

[1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html
___
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


___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Roland Smith
On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:
 Hi all,
 
 Now that OpenSolaris is dead [1] I was wondering what the status of Java 
 is in FreeBSD.
 [1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html

IMO the status of Java is best to avoid it. Just ask Google. :-)

 I'm currently using OpenJDK16 from ports. Is OpenJDK free from Oracle 
 hands or not?

Depends what you mean by free. It's under the GPLv2, so I think you should be
good wrt copyrights. 

Patents might be different matter, though! To the best of my knowledge, the EU
law doesn't allow patenting software. But if you really want to know where you
stand you should consult a lawyer who knows Spanish and EU patent law.

People in the US could very well be screwed, however. OTOH, Oracle's lawsuit
against Google over Android could potentially lead to the patents asserted in
that case being found invalid.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgp8EQMUaa2tO.pgp
Description: PGP signature


Re: AHCI driver

2010-08-13 Thread David DEMELIER
2010/8/10 Victor Ophof mr4hu...@hotmail.com:


 -Oorspronkelijk bericht-
 Van: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
 questi...@freebsd.org] Namens Roland Smith
 Verzonden: dinsdag 10 augustus 2010 15:14
 Aan: Victor Ophof
 CC: freebsd-questions@freebsd.org; d...@nagual.nl
 Onderwerp: Re: AHCI driver

 On Tue, Aug 10, 2010 at 02:37:42PM +0200, Victor Ophof wrote:
 
  Its better to enable,
 
  but AD4 can get renamed to ada0

 I think you should change can to will. :-)

  but it's easy to fix
  you just need to edit the /etc/fstab to point to the newly named drives
 ..

 Do this _before_ rebooting! When I rebooted into single user mode to
 update my
 laptop running 8.0 to 8.1, I couldn't edit my /etc/fstab, because my / wat
 mounted read-only, and I could not get it to remount as read/write! I had
 to
 boot with the old kernel (/boot/kernel.old/kernel) to be able to mount
 root as
 read/write and fix etc/fstab!

 There is a trick on the web,
 Something with mount -u then mount -a .. but the next link sounds better :)
 http://www.wonkity.com/~wblock/docs/html/ahci.html


 Roland
 --
 R.F.Smith                                   http://www.xs4all.nl/~rsmith/
 [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
 pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

 ___
 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


In single-user mode, just use mount -o rw / and it works.

I personnaly do this before editing something in single-user mode :

# mount -o rw /
# mount /var
# mount /usr
# TERM=vt100 vi /etc/fstab

and everything is okay ;-)

-- 
Demelier David
___
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: Grepping a list of words

2010-08-13 Thread John Levine
 Since I will have a need to run this check frequently, any suggestions for
 a better approach are welcome.

sort -u and comm(1)?

sort is O(N log N) while grep is O(N)

Which is faster depends on the constant factors in each, but as the
data sets get bigger, the log N term will dominate.  That is, for
small sets of data, I don't know which will be faster, but either will
be fast enough so who cares.  For large sets of data, the sort will be
slow.

R's,
John
___
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


apsfilter - hpijs dependence

2010-08-13 Thread Chuck Bacon

In all FreeBSD-8.* so far, apsfilter can't be installed because of
a dependenct on hpijs, apparently through foomatic.  Is there a fix?
I have no HP printer, so... a workaround?  I find cups to be opaque,
at my level at least :-(
Thanks for previous help and present hope!
c...@cape.com
ABHOR SECRECY - DEFEND PRIVACY
___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Antonio Vieiro

On 13/08/2010 20:57, Roland Smith wrote:

On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:



I'm currently using OpenJDK16 from ports. Is OpenJDK free from Oracle
hands or not?


Depends what you mean by free. It's under the GPLv2, so I think you should be
good wrt copyrights.


I think that the Diablo JVM has Sun source code [1], and this is 
released under a partner agreement or something, so I imagine Oracle 
could shut it down as well, right?


OpenJDK is under GPLV2, but I'm not sure it covers the whole JVM. I'll 
try to find out.


Thanks,
Antonio

[1] http://www.freebsdfoundation.org/downloads/java.shtml



Patents might be different matter, though! To the best of my knowledge, the EU
law doesn't allow patenting software. But if you really want to know where you
stand you should consult a lawyer who knows Spanish and EU patent law.

People in the US could very well be screwed, however. OTOH, Oracle's lawsuit
against Google over Android could potentially lead to the patents asserted in
that case being found invalid

Roland


___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Kurt Buff
On Fri, Aug 13, 2010 at 11:57, Roland Smith rsm...@xs4all.nl wrote:
 On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:
 Hi all,

 Now that OpenSolaris is dead [1] I was wondering what the status of Java
 is in FreeBSD.
 [1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html

 IMO the status of Java is best to avoid it. Just ask Google. :-)

So, what do you suggest for SSL VPN clients? Some/most/all of the
clients for these things are Java-based - well, except for clients
running Windows and for which there is (usually) an ActiveX control
(shudder.)

That's just the most interesting one to me, but OOo also relies on
Java for some functionality (thought that's somewhat a Sun/Oracle
effort too, and one wonders about its fate also) and there are other
applications for which Java is a critical component.

Kurt
___
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: Page fault in kernel when using CD, BSD 7.2

2010-08-13 Thread Chris Whitehouse

Mark Terribile wrote:
AMI BIOS.  The NB heatsink is barely warm (fan cooled), the

not necessarily a good sign, you would get this if the heat from the cpu 
is not getting transferred to the heatsink. Remove, clean, apply new 
heat transfer compound, make sure the heatsink is actually seating 
properly, not getting lodged on something.


Chris
___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Roland Smith
On Fri, Aug 13, 2010 at 12:58:01PM -0700, Kurt Buff wrote:
 On Fri, Aug 13, 2010 at 11:57, Roland Smith rsm...@xs4all.nl wrote:
  On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:
  Hi all,
 
  Now that OpenSolaris is dead [1] I was wondering what the status of Java
  is in FreeBSD.
  [1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html
 
  IMO the status of Java is best to avoid it. Just ask Google. :-)
 
 So, what do you suggest for SSL VPN clients? Some/most/all of the
 clients for these things are Java-based - well, except for clients
 running Windows and for which there is (usually) an ActiveX control
 (shudder.)

If I read [2] correctly, isn't SSL VPN supposed to be clientless and work
through the browser?

[2]: http://www.windowsecurity.com/articles/VPN-Options.html

 That's just the most interesting one to me, but OOo also relies on
 Java for some functionality (thought that's somewhat a Sun/Oracle
 effort too, and one wonders about its fate also) and there are other
 applications for which Java is a critical component.

According to [3], some OpenOffice functionality depends on Java, but it can be
built without it. I hacked the OOO (2.x IIRC) port to that effect once, but I
deleted it since I didn't use it much. Personally I prefer Emacs, LaTeX and
assorted scripting languages. :-)

[3]: http://wiki.services.openoffice.org/wiki/Java_and_OpenOffice.org

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpugFS5taLNd.pgp
Description: PGP signature


Re: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Gary Kline
On Fri, Aug 13, 2010 at 08:57:08PM +0200, Roland Smith wrote:
 On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:
  Hi all,
  
  Now that OpenSolaris is dead [1] I was wondering what the status of Java 
  is in FreeBSD.
  [1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html
 
 IMO the status of Java is best to avoid it. Just ask Google. :-)
 
  I'm currently using OpenJDK16 from ports. Is OpenJDK free from Oracle 
  hands or not?
 
 Depends what you mean by free. It's under the GPLv2, so I think you should be
 good wrt copyrights. 
 
 Patents might be different matter, though! To the best of my knowledge, the EU
 law doesn't allow patenting software. But if you really want to know where you
 stand you should consult a lawyer who knows Spanish and EU patent law.
 
 People in the US could very well be screwed, however. OTOH, Oracle's lawsuit
 against Google over Android could potentially lead to the patents asserted in
 that case being found invalid.

y're right on your last paragraph.  i think/hope that oracle's fist
fight leads to their quicker bankruptcy... to which they've been
headed for quite some time.  
 
 Roland
 -- 
 R.F.Smith   http://www.xs4all.nl/~rsmith/
 [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
 pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
The 7.83a release of Jottings: http://jottings.thought.org/index.php
   http://journey.thought.org


___
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: Status of Java in FreeBSD? (OpenSolaris is dead)

2010-08-13 Thread Mikhail
 -Original Message-
 From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
 questi...@freebsd.org] On Behalf Of Roland Smith
 Sent: Saturday, August 14, 2010 12:50 AM
 To: Kurt Buff
 Cc: FreeBSD Questions
 Subject: Re: Status of Java in FreeBSD? (OpenSolaris is dead)
 
 On Fri, Aug 13, 2010 at 12:58:01PM -0700, Kurt Buff wrote:
  On Fri, Aug 13, 2010 at 11:57, Roland Smith rsm...@xs4all.nl wrote:
   On Fri, Aug 13, 2010 at 07:59:20PM +0200, Antonio Vieiro wrote:
   Hi all,
  
   Now that OpenSolaris is dead [1] I was wondering what the status of
 Java
   is in FreeBSD.
   [1] http://sstallion.blogspot.com/2010/08/opensolaris-is-dead.html
  
   IMO the status of Java is best to avoid it. Just ask Google. :-)
 
  So, what do you suggest for SSL VPN clients? Some/most/all of the
  clients for these things are Java-based - well, except for clients
  running Windows and for which there is (usually) an ActiveX control
  (shudder.)
 
 If I read [2] correctly, isn't SSL VPN supposed to be clientless and work
 through the browser?
 
 [2]: http://www.windowsecurity.com/articles/VPN-Options.html

Yeah, but when you want to launch any application through WebVPN (telnet for
example) you have to start Java applet.

___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Dan Nelson
In the last episode (Aug 13), Yuri said:
 On 08/13/2010 09:24, Dan Nelson wrote:
  Try adding -B/usr/lib32 to your first gcc line.  The specs file should
  be modified to add this automatically when you pass -m32, imho.
 
 Thank you Dan, this flag worked.
 
 But I found a strange discrepancy between 32bit and 64bit.
 When I compile the program below in 64 bit, I get the correct result. 
 With 32 bit executable compiled on 64 bit system like you suggested 
 there is another (wrong) result. On 32 bit system result is also 
 correct, the same as with 64 executable.
 
 This is a very strange discrepancy. rm_eo field is zero in the match 
 result which is wrong. I can't think of any explanation for it.

I think Anonymous is right, and that it's due to the /usr/include headers on
amd64 not being 32-bit-mode aware.  So you end up with some structure
members being sized for 64-bit machines instead of 32-bit.  I bet struct
regex_t on your cross-compiled program is the same size as your native
64-bit program, where it should match your 32-bit program instead.  I took
that -B /usr/lib32 flag from /usr/src/Makefile.inc1 , where it builds the
lib32 compat libraries, and it looks like it also temporarily installs a
full 32-bit include directory and compiles against that with -iprefix
${LIB32TMP}/usr/ .  You may have to install a full 32-bit tree somewhere
and chroot to it to build, or look more closely at how buildworld compiles
the lib32 stuff and mimic that, or submit patches to the base include files
that make them 32 and 64-bit compatible depending on compiler flags.

-- 
Dan Nelson
dnel...@allantgroup.com
___
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


Favorite terminal software?

2010-08-13 Thread Ed Flecko
In the past, I've used TeraTerm Pro with SSH (since it's free and
seems to work just fine), but I wanted to see if anyone had any other
recommendations for terminal software they like.

I'd like it to be free, but if you've got something you really like
that costs a few bucks, I'm O.K. with that too.

Suggestions???

Thank you,
Ed
___
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: Favorite terminal software?

2010-08-13 Thread Mikhail
 -Original Message-
 From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
 questi...@freebsd.org] On Behalf Of Ed Flecko
 Sent: Saturday, August 14, 2010 2:14 AM
 To: freebsd-questions@freebsd.org
 Subject: Favorite terminal software?
 
 In the past, I've used TeraTerm Pro with SSH (since it's free and
 seems to work just fine), but I wanted to see if anyone had any other
 recommendations for terminal software they like.
 
 I'd like it to be free, but if you've got something you really like
 that costs a few bucks, I'm O.K. with that too.

A lot of people use PuTTY (or KiTTY, fork of PuTTY). SecureCRT is very
popular also because of scripting/tabs support, but it's costly.

___
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: Favorite terminal software?

2010-08-13 Thread Bill Campbell
On Fri, Aug 13, 2010, Ed Flecko wrote:
In the past, I've used TeraTerm Pro with SSH (since it's free and
seems to work just fine), but I wanted to see if anyone had any other
recommendations for terminal software they like.

I'd like it to be free, but if you've got something you really like
that costs a few bucks, I'm O.K. with that too.

Suggestions???

I do the vast majority of my work with ssh and xterm, only using
putty, gnome-terminal, etc. when testing terminal applications.

FWIW, I just did some testing today with the iSSH App on an iPad,
and it works reasonably well connecting to a variety of *nix
servers.

I do have clients connecting to FilePro applications using the
PowerTerm program from Ericom, mostly because they want something
that does a good SCO emulation as FilePro's support for xterm is
somewhat poor (which I'm working on now fix the termcap :-).

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186  Skype: jwccsllc (206) 855-5792

politics, as a practice, whatever its professions, has always
been the systematic organization of hatreds. -- Heny Adams
___
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: Documentation on how to build 32bit applications on amd64?

2010-08-13 Thread Yuri

On 08/13/2010 14:44, Dan Nelson wrote:

I think Anonymous is right, and that it's due to the /usr/include headers on
amd64 not being 32-bit-mode aware.  So you end up with some structure
members being sized for 64-bit machines instead of 32-bit.  I bet struct
regex_t on your cross-compiled program is the same size as your native
64-bit program, where it should match your 32-bit program instead.  I took
that -B /usr/lib32 flag from /usr/src/Makefile.inc1 , where it builds the
lib32 compat libraries, and it looks like it also temporarily installs a
full 32-bit include directory and compiles against that with -iprefix
${LIB32TMP}/usr/ .  You may have to install a full 32-bit tree somewhere
and chroot to it to build, or look more closely at how buildworld compiles
the lib32 stuff and mimic that, or submit patches to the base include files
that make them 32 and 64-bit compatible depending on compiler flags.
   


I think the best way is to modify headers to depend on compiler flags 
(__i386/__amd64). This makes such cross compile seamless for all future 
attempts to cross compile.
The problem I see is that there are currently 83 includes of 
machine/... headers from outside the machine/ hierarchy.

cd /usr/include  grep -r machine * | grep include | grep -v ^machine
Looks like all of them should be made conditional on compiler flags like 
this:

...
#if !defined(__i386)
#include machine/header.h
#else
#include /usr/src/sys/i386/include/header.h
#endif
...
Or rather pointing to some location (if any) where 32 bit headers would 
normally reside on amd64 host.

Do you think this is reasonable?
Should I make a patch, or maybe further discuss on hack...@?

Yuri
___
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: ts_to_ct flood on 8.1-STABLE

2010-08-13 Thread b. f.
Since installing 8.1-RC2 and now on up-to-date RELENG_8 I am frequently
getting kern.crit messages like

ts_to_ct(1281661818.743348859) = [2010-08-13 01:10:18]

and have been unable so far to determine their origin or purpose. I saw
no such messages while running 7.x or earlier releases.

This occurs when the rtc is set, via:

atrtc_settime--clock_ts_to_ct

after a verbose boot.  I think that someone changed some of the
timekeeping code to periodically adjust the value of the rtc if ntp is
used to update the system time, machdep.disable_rtc_set=0, and the rtc
driver hasn't been disabled:

http://svnweb.freebsd.org/viewvc/base?view=revisionrevision=208297

This is probably what you are seeing.  It should occur every
machdep.rtc_save_period seconds. It's probably harmless, unless the
adjustments are big or erratic, in which case you may want to check
your rtc's battery, or the results of your ntp usage.

b.
___
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


5900 RPM drives

2010-08-13 Thread Ryan Coleman
Can anyone give me any reasons to buy these over 7200RPMs for a RAID? I may 
need to pinch pennies if I have to finance my next servers out of pocket. 
Stupid idea, I know, but I really want to know if there's a reason to skimp.

--
Ryan

___
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: 5900 RPM drives

2010-08-13 Thread Svein Skogen (Listmail account)
On 14.08.2010 03:52, Ryan Coleman wrote:
 Can anyone give me any reasons to buy these over 7200RPMs for a RAID? I may 
 need to pinch pennies if I have to finance my next servers out of pocket. 
 Stupid idea, I know, but I really want to know if there's a reason to skimp.

They're a little slower, use a whole lot less power (saves pennies per
hour), meaning less heat (pennies per hour saved on cooling), less
vibrations (increased lifetime, less need to noise-isolate disk setups
to avoid vibrations slowing seeks).

Unless you _NEED_ the 125mbytes/sec-per-device transfers of the 7200rpm
drives (you can live with 100mbytes/sec), then go for the 5900rpm drives.

//Svein

-- 
+---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
+---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.

 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/




signature.asc
Description: OpenPGP digital signature


Re: Telnet = servname ai_socktype error

2010-08-13 Thread Ashish SHUKLA
jaymax  writes:

 telnet 0 smtp
 is the same as
 telnet localhost 25 
 or 
 telnet localhost smtp

#v+
% getent hosts 0
0.0.0.0   0
% telnet 0 25
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
220 chateau.d.if ESMTP
^]
telnet quit
Connection closed.
#v-

I wasn't expecting this to even work. I hope this connecting to the wild-card
address only works on the same box.

And sorry I didn't know that connecting to 0.0.0.0 actually connects to
127.0.0.1.

But its interesting how 'getent hosts' returns an IPv4 address when given a
32-bit number as hostname.

-- 
Ashish SHUKLA  | GPG: F682 CDCC 39DC 0FEA E116  20B6 C746 CFA9 E74F A4B0
freebsd.org!ashish | http://people.freebsd.org/~ashish/

“A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away.” (Antoine de
Saint-Exupéry)


pgpOu795oPxcu.pgp
Description: PGP signature


Re: 5900 RPM drives

2010-08-13 Thread Ryan Coleman
I was actually looking at the Seagate Barracuda model... I'm upgrading my RAID 
5 of 8x1TB  to something larger. $135 each: 
http://www.newegg.com/Product/Product.aspx?Item=N82E16822148487

On Aug 13, 2010, at 10:28 PM, TJ Varghese wrote:

 
 
 On Sat, Aug 14, 2010 at 9:52 AM, Ryan Coleman ryan.cole...@cwis.biz wrote:
 Can anyone give me any reasons to buy these over 7200RPMs for a RAID? I may 
 need to pinch pennies if I have to finance my next servers out of pocket. 
 Stupid idea, I know, but I really want to know if there's a reason to skimp.
 
 
 Specific models that you're considering would be good. For WD, if you're 
 referring to the WD's GreenPower (non-RAID Ed), there are 2 gotchas
 
 1) no support for TLER any longer - this IMHO is a deal breaker for RAID
 2) ridiculously low sleep times (6s) to maximize power savings - in a server, 
 this would cause extreme load cycles, however this setting can be set to less 
 extreme numbers using wdidle.
 
 The main technical criterion for any HDDs to be used in a raid IMO should be 
 TLER support IMO. Speed/capacity would be secondary concerns.
 
 
 regards,
 TJ

___
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


test

2010-08-13 Thread PR


___
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: 5900 RPM drives

2010-08-13 Thread TJ Varghese
On Sat, Aug 14, 2010 at 9:52 AM, Ryan Coleman ryan.cole...@cwis.biz wrote:

 Can anyone give me any reasons to buy these over 7200RPMs for a RAID? I may
 need to pinch pennies if I have to finance my next servers out of pocket.
 Stupid idea, I know, but I really want to know if there's a reason to skimp.


Specific models that you're considering would be good. For WD, if you're
referring to the WD's GreenPower (non-RAID Ed), there are 2 gotchas

1) no support for TLER any longer - this IMHO is a deal breaker for RAID
2) ridiculously low sleep times (6s) to maximize power savings - in a
server, this would cause extreme load cycles, however this setting can be
set to less extreme numbers using wdidle.

The main technical criterion for any HDDs to be used in a raid IMO should be
TLER support IMO. Speed/capacity would be secondary concerns.


regards,
TJ
___
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: test

2010-08-13 Thread Svein Skogen (Listmail account)
On 14.08.2010 05:23, PR wrote:
 
 

epic fail. ;)

//Svein

-- 
+---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
+---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.

 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/




signature.asc
Description: OpenPGP digital signature


Re: Telnet = servname ai_socktype error

2010-08-13 Thread jaymax

TY Dan, 
I ran the tcpdump on the lo0 interface, ran telnet as shown below,
interestingly only the telnet localhost 25  produced an output (which I
cannot fully decipher, except for the acknowledgment hand shake and the
checksum, but can't figure out the drop or closure event
Oddly, telnet localhost smtp and telnet localhost  produced nothing in
the dumpfile, just the localhost: servname not supported for ai_socktype
to stdout

[1]

mach# telnet localhost
 localhost: servname not supported for ai_socktype
 

[2]

mach# telnet localhost smtp
 localhost: servname not supported for ai_socktype
 

[3]

mach# telnet localhost 25
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 Connection closed by foreign host.
 

Only [3] produced a tcpdump output, shown as follows ==



 mach# tcpdump -i lo0 -vvv  tcpdumpfile
 
 Ctrl C
 7 packets captured
 7 packets received by filter
 0 packets dropped by kernel
 


20:31:41.366749 IP (tos 0x10, ttl 64, id 11415, offset 0, flags [DF], proto
TCP (6), length 60) localhost.54336  localhost.25: S, cksum 0x5c3a
(correct), 1583394158:1583394158(0) win 65535 mss 16344,nop,wscale
3,sackOK,timestamp 10736343 0


20:31:41.366815 IP (tos 0x0, ttl 64, id 11416, offset 0, flags [DF], proto
TCP (6), length 60) localhost.25  localhost.54336: S, cksum 0xc615
(correct), 2069694587:2069694587(0) ack 1583394159 win 65535 mss
16344,nop,wscale 3,sackOK,timestamp 394525367 10736343


20:31:41.366836 IP (tos 0x10, ttl 64, id 11417, offset 0, flags [DF], proto
TCP (6), length 52) localhost.54336  localhost.25: ., cksum 0x0c01
(correct), 1:1(0) ack 1 win 8960 nop,nop,timestamp 10736344 394525367


20:31:41.398688 IP (tos 0x0, ttl 64, id 11421, offset 0, flags [DF], proto
TCP (6), length 52) localhost.25  localhost.54336: F, cksum 0x0be1
(correct), 1:1(0) ack 1 win 8960 nop,nop,timestamp 394525398 10736344


20:31:41.398731 IP (tos 0x10, ttl 64, id 11422, offset 0, flags [DF], proto
TCP (6), length 52) localhost.54336  localhost.25: ., cksum 0x0bc2
(correct), 1:1(0) ack 2 win 8960 nop,nop,timestamp 10736375 394525398


20:31:41.399162 IP (tos 0x10, ttl 64, id 11423, offset 0, flags [DF], proto
TCP (6), length 52) localhost.54336  localhost.25: F, cksum 0x0bc0
(correct), 1:1(0) ack 2 win 8960 nop,nop,timestamp 10736376 394525398


20:31:41.399191 IP (tos 0x0, ttl 64, id 11424, offset 0, flags [DF], proto
TCP (6), length 52) localhost.25  localhost.54336: ., cksum 0x0bc0
(correct), 2:2(0) ack 2 win 8959 nop,nop,timestamp 394525399 10736376

Hope you can see something in there, Thanks again

PS: Couldn't find anything in the /var/log files either
Shouldn't the telnet localhost generate a connection?

--


Dan Nelson wrote:
 
 In the last episode (Aug 12), jaymax said:
 
 FreeBSD my.domain.com 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May  1
 08:49:13
 UTC 2009 
 r...@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
 
 Testing a Qmail SMTP installation with Telnet
 
 (normally use SSH for networking)
 
 Temporary Telnet set up for testing ==
 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 
 Server set up ==
 
 % telnet localhost 25
 Trying 127.0.0.1...
 telnet: connect to address 127.0.0.1: Connection reset by peer
 
 That sounds like you connected but qmail crashed or otherwise uncleanly
 closed the socket.  Does a tcpdump on lo0 show any interesting activity
 when
 you try that command?
 
 -- 
   Dan Nelson
   dnel...@allantgroup.com
 ___
 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
 
 

-- 
View this message in context: 
http://old.nabble.com/Telnet-%3D%3E-servname-ai_socktype-error-tp29425269p29434929.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
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