LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Segmentation fault (core dumped) (https://www.linuxquestions.org/questions/linux-newbie-8/segmentation-fault-core-dumped-4175515908/)

mohammad taqy bayat 08-22-2014 03:45 AM

Segmentation fault (core dumped)
 
Hi friends,
I have a problem with my system when I run my exe file named BINA like following:

bayat@bayat:~/BINA/stadaq$ ./BINA -s johan.sys
Segmentation fault (core dumped)

my machine is 64-bit that UBUNTU 12.04 (32-bit) and ROOT 5.34.20 are installed on it.
What does "Segmentation fault" means? and how is possible to fix it?
Hope someone can help me. Thanks in advance!!

jdkaye 08-22-2014 04:31 AM

Quote:

Originally Posted by mohammad taqy bayat (Post 5225274)
Hi friends,
I have a problem with my system when I run my exe file named BINA like following:

bayat@bayat:~/BINA/stadaq$ ./BINA -s johan.sys
Segmentation fault (core dumped)

my machine is 64-bit that UBUNTU 12.04 (32-bit) and ROOT 5.34.20 are installed on it.
What does "Segmentation fault" means? and how is possible to fix it?
Hope someone can help me. Thanks in advance!!

I don't understand. You can't run .exe files on linux. The .exe files run on Windows and Windows alone. What exactly is BINA supposed to do?
jdk

mohammad taqy bayat 08-25-2014 01:57 AM

i mean the BINA is executable.
BINA is result of following makefile:

CC = gcc CFLAGS = -c -Wall LD = gcc

CSRCS = Online_ana.c fppdaq.c SentEvent2Root.c bina_unpack.c tcpip.c

OBJS = $(CSRCS:.c=.o)

INCLDS = -I. -I../cdaq -I../elec_lib -I../common

DEFS = -DLinux86 -DAnalysis -DOSF1

LIBS = -lpthread -lg2c -lcrypt -ldl -lm -lnsl CDAQLIB = ../cdaq/Debug.a ../elec_lib/Elec.a

BINA: $(OBJS)
$(LD) $(OBJS) -o $@ $(CDAQLIB) $(LIBS)

.c.o:
$(CC) $(CFLAGS) $(DEFS) $(INCLDS) $<

clean: rm -f *.o *~ core ./BINA

pan64 08-25-2014 02:10 AM

I hope this is originally put into three lines:
CC = gcc CFLAGS = -c -Wall LD = gcc
also this should be put in 2 lines:
LIBS = -lpthread -lg2c -lcrypt -ldl -lm -lnsl CDAQLIB = ../cdaq/Debug.a ../elec_lib/Elec.a

From the other hand without knowing what is that BINA and having that core file.....
you can try strace for example or post-mortem debuggers to find out the reason.
http://www.epanorama.net/newepa/2014...ling-in-linux/


All times are GMT -5. The time now is 04:45 AM.