Re: Problem w/ simple Hello World compiled w/ g++

2005-06-13 Thread Keyser

Just tried your code on a freshly installed machine, just standard
install, no updates performed, and I still cannot reproduce the
problem. Your code compiles and runs fine.

--
Dmitry


Yeah, that's what I feared.  At this point the only plausible cause for this 
that I can think of is gremlins.  I tried installing FreeBSD 5.4 on a 
different, much older and slower box I had, and wouldn't you know, it works. 
Maybe FreeBSD 5.x doesn't like my newer mobo or something, who knows at this 
point.  I've given up on getting it to work on that box.  Thanks anyway 
though. 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: make installkernel fails instantly w/ signal 11

2005-06-11 Thread Keyser

Cut and pasted from /usr/src/Makefile
- - - CUT - - -
# Make sure we have an up-to-date make(1). Only world and buildworld
# should do this as those are the initial targets used for upgrades.
# The user can define ALWAYS_CHECK_MAKE to have this check performed
# for all targets.
#
- - - CUT - - -

Try make and install kernel without -DALWAYS_CHECK_MAKE.

Vladimir Dvorak


Just tried it, exact same error. :(
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


make installkernel fails instantly w/ signal 11

2005-06-11 Thread Keyser
In an effort to get the simplest of compiled c++ programs (compiled with g++) 
to actually run without a segfault on my box I'm trying to update everything.  
So I cvsup'd src-all and ports-all.  Then I did:

make -j4 buildworld (which worked)
make -DALWAYS_CHECK MAKE buildkernel (which also worked)

However, then when I try to installkernel I get a signal 11 immediately as 
shown below.  I've tried it in single user mode with the same result.  Not sure 
what I'm doing wrong?  I've read signal 11 is usually caused by hardware issues 
but it seems strange this box could build both world and kernel without any 
problems if that were the case.

vitoc# cd /usr/src
vitoc# pwd
/usr/src
vitoc# ls
COPYRIGHT   UPDATINGgnu rescue  usr.bin
LOCKS   bin include sbinusr.sbin
MAINTAINERS contrib kerberos5   secure
Makefilecrypto  lib share
Makefile.inc1   etc libexec sys
README  games   release tools
vitoc# make -DALWAYS_CHECK_MAKE installkernel
--
>>> Making hierarchy
--
cd /usr/src;  MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=i386  MACHINE=i386  
CPUTYPE=  GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin  
GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font  
GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac 
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 /usr/obj/usr/src/make.i386/make -f Makefile.inc1 hierarchy
cd /usr/src/etc;/usr/obj/usr/src/make.i386/make distrib-dirs
mtree -eU  -f /usr/src/etc/mtree/BSD.root.dist -p /
mtree -eU  -f /usr/src/etc/mtree/BSD.var.dist -p /var
*** Signal 11

Stop in /usr/src/etc.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
vitoc#

I've literally done everything "by the book" but maybe I've missed something 
obvious to someone else?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: g++ successfully compiled "Hello World" program causes segfault at runtime

2005-06-09 Thread Keyser

Hello,

please show the output of 'env' and 'cat /var/run/dmesg.boot' to receive 
an impression of you system.


Björn


Here you go and thanks for taking the time to look at this.

vitoc# env
USER=root
HOME=/root
SHELL=/bin/csh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
MAIL=/var/mail/root
BLOCKSIZE=K
FTP_PASSIVE_MODE=YES
TERM=xterm
HOSTTYPE=FreeBSD
VENDOR=intel
OSTYPE=FreeBSD
MACHTYPE=i386
SHLVL=1
PWD=/usr/temp/cpp
LOGNAME=root
GROUP=wheel
HOST=vitoc.vitoc.com
REMOTEHOST=192.168.1.91
EDITOR=vi
PAGER=more



vitoc# cat /var/run/dmesg.boot
Copyright (c) 1992-2005 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
FreeBSD 5.4-RELEASE #0: Sun May  8 10:21:06 UTC 2005
   [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC
ACPI APIC Table: 
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) XP 2600+ (1913.20-MHz 686-class CPU)
 Origin = "AuthenticAMD"  Id = 0x6a0  Stepping = 0
 
Features=0x383fbff
 AMD Features=0xc040
real memory  = 1073676288 (1023 MB)
avail memory = 1041121280 (992 MB)
ioapic0  irqs 0-23 on motherboard
npx0:  on motherboard
npx0: INT 16 interface
acpi0:  on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0:  on acpi0
acpi_button0:  on acpi0
pcib0:  port 0xcf0-0xcf3,0xcf8-0xcff on acpi0
pci0:  on pcib0
agp0:  mem 0xd800-0xdbff at device 
0.0 on pci0

pci0:  at device 0.1 (no driver attached)
pci0:  at device 0.2 (no driver attached)
pci0:  at device 0.3 (no driver attached)
pci0:  at device 0.4 (no driver attached)
pci0:  at device 0.5 (no driver attached)
isab0:  at device 1.0 on pci0
isa0:  on isab0
pci0:  at device 1.1 (no driver attached)
ohci0:  mem 0xe0002000-0xe0002fff irq 22 at 
device 2.0 on pci0

usb0: OHCI version 1.0, legacy support
usb0: SMM does not respond, resetting
usb0:  on ohci0
usb0: USB revision 1.0
uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1:  mem 0xe0003000-0xe0003fff irq 21 at 
device 2.1 on pci0

usb1: OHCI version 1.0, legacy support
usb1: SMM does not respond, resetting
usb1:  on ohci1
usb1: USB revision 1.0
uhub1: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
pci0:  at device 2.2 (no driver attached)
pcib1:  at device 8.0 on pci0
pci1:  on pcib1
re0:  port 0x9000-0x90ff mem 
0xdf00-0xdfff irq 16 at device 11.0 on pci1

miibus0:  on re0
rgephy0:  on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 
1000baseTX-FDX, auto

re0: Ethernet address: 00:0d:61:12:32:9c
atapci0:  port 
0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 9.0 on pci0

ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
pcib2:  at device 30.0 on pci0
pci2:  on pcib2
pci2:  at device 0.0 (no driver attached)
fdc0:  port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on 
acpi0

sio0: type 16550A
ppc0:  port 0x778-0x77b,0x378-0x37f irq 7 drq 3 
on acpi0

ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
ppbus0:  on ppc0
plip0:  on ppbus0
lpt0:  on ppbus0
lpt0: Interrupt-driven port
ppi0:  on ppbus0
atkbdc0:  port 0x64,0x60 irq 1 on acpi0
atkbd0:  irq 1 on atkbdc0
kbd0 at atkbd0
orm0:  at iomem 0xcc000-0xd3fff,0xc-0xcbfff on isa0
pmtimer0 on isa0
sc0:  at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0:  at port 0x3c0-0x3df iomem 0xa-0xb on isa0
ums0: Microsoft Microsoft 3-Button Mouse with IntelliEye(TM), rev 1.10/3.00, 
addr 2, iclass 3/1

ums0: 3 buttons and Z dir.
Timecounter "TSC" frequency 1913198534 Hz quality 800
Timecounters tick every 10.000 msec
ad0: 57240MB  [116298/16/63] at ata0-master 
UDMA100

acd0: DVDROM  at ata1-master PIO4
Mounting root from ufs:/dev/ad0s1a
vitoc#

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: g++ successfully compiled "Hello World" program causes segfault at runtime

2005-06-09 Thread Keyser

Do you have any locale environment variables set?  The program runs
fine on my machine.

--
Dan Nelson


I don't think so?  This is a completely fresh install of FreeBSD 5.4. 
Haven't made any changes.  Maybe I need to change something?  However, it 
would be strange to install with default settings that wouldn't work with a 
simple "Hello World" program IMO. 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


g++ successfully compiled "Hello World" program causes segfault at runtime

2005-06-09 Thread Keyser
I posted this topic a few days ago but still haven't found a solution yet.  
However, I believe I'm able to provide more information now.  Here is a log 
showing what I'm up against:

vitoc# pwd
/usr/temp/cpp
vitoc# ls
test.cpp
vitoc# cat test.cpp
#include 
using namespace std;

int main()
{
cout << "Hello world!";
return 0;
}
vitoc# g++ -g -o test test.cpp
vitoc# ls
testtest.cpp
vitoc# gdb test
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) run
Starting program: /usr/temp/cpp/test

Program received signal SIGSEGV, Segmentation fault.
0x2819d7de in wctype () from /lib/libc.so.5
(gdb) bt
#0  0x2819d7de in wctype () from /lib/libc.so.5
#1  0x28119002 in std::ctype::_M_convert_to_wmask ()
   from /usr/lib/libstdc++.so.4
#2  0x28119453 in std::ctype::_M_initialize_ctype ()
   from /usr/lib/libstdc++.so.4
#3  0x28119b08 in std::ctype::ctype () from /usr/lib/libstdc++.so.4
#4  0x28112a69 in std::locale::_Impl::_Impl () from /usr/lib/libstdc++.so.4
#5  0x281120ba in std::locale::_S_initialize_once ()
   from /usr/lib/libstdc++.so.4
#6  0x28112128 in std::locale::_S_initialize () from /usr/lib/libstdc++.so.4
#7  0x28111e9b in std::locale::locale () from /usr/lib/libstdc++.so.4
#8  0x280e3531 in __gnu_cxx::stdio_sync_filebuf 
>::stdio_sync_filebuf () from /usr/lib/libstdc++.so.4
#9  0x2810c0e2 in std::ios_base::Init::Init () from /usr/lib/libstdc++.so.4
#10 0x0804888e in __static_initialization_and_destruction_0 (__initialize_p=1,
__priority=65535) at iostream:77
#11 0x080488d9 in global constructors keyed to main () at test.cpp:9
#12 0x08048922 in __do_global_ctors_aux ()
#13 0x08048536 in _init ()
#14 0x08048682 in _start ()
#15 0x0001 in ?? ()
(gdb) kill
Kill the program being debugged? (y or n) y
(gdb) quit
vitoc# ldd test
test:
libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28076000)
libm.so.3 => /lib/libm.so.3 (0x28148000)
libc.so.5 => /lib/libc.so.5 (0x28163000)
vitoc# g++ -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728
vitoc#

This is on FreeBSD 5.4 obtained from a freebsd.org mirror.  Any ideas?  Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Problem w/ simple Hello World compiled w/ g++

2005-06-07 Thread Keyser
I know quite a bit about programming, but not a lot about FreeBSD.  I've been 
pulling my hair out all morning just trying to get an unbelievably simple c++ 
"Hello World" program to run (it compiles fine) under FreeBSD.  Here's the 
source:

//helloworld.cpp
#include 
using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}

I use g++ and it compiles fine, but I get an error immediately after running 
the program:

# g++ -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728
# ls
helloworld.cpp
# g++ -o helloworld helloworld.cpp
# ls
helloworld  helloworld.cpp
# ./helloworld
Segmentation fault (core dumped)

Do I have missing or out of date libraries (not sure how that's possible since 
I'm using the latest version of FreeBSD, 5.4) or something and how do I remedy 
that situation?  Also, I haven't "added" anything else related to development 
yet, and wouldn't expect I'd have to just to get a Hello World program to run 
properly, but maybe I'm wrong?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"