Bug 691262 - make sodebug returned error 2 (Segmentation fault)
Summary: make sodebug returned error 2 (Segmentation fault)
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 8.71
Hardware: PC Linux
: P4 normal
Assignee: Ralph Giles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-23 19:00 UTC by Constantine S. Ljapin
Modified: 2010-04-24 22:12 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
My script for build project in root of the project, log-file, screen output of gdb (GNU Debugger) and modified files makefile (aka base/unix-gcc.mak) and base/echogs.c in tar-archive attachements.tar (70.00 KB, application/x-tar)
2010-04-23 19:00 UTC, Constantine S. Ljapin
Details
patch 6124, adapted for version 8.71 (1.40 KB, patch)
2010-04-24 22:12 UTC, AuR/eliano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Constantine S. Ljapin 2010-04-23 19:00:44 UTC
Created attachment 6217 [details]
My script for build project in root of the project, log-file, screen output of gdb (GNU Debugger) and modified files makefile (aka base/unix-gcc.mak) and base/echogs.c in tar-archive attachements.tar

Hello.
Sorry for my bad English.
I can not to build ghostscript and dynamic library libgs.so from sources.
I read bug reports 689641 and 690296, because have similar situation.
Considering readed I created script makesodebug.sh in root directory of the project ghostscript-8.71:

+--- cut  on ---+
./configure --enable-dynamic --disable-cups --enable-debug && ln -s base/unix-gcc.mak makefile && rm -v Makefile && vi makefile && vi base/echogs.c && make sodebug; echo $?
+--- cut off ---+

and run it by command

+--- cut  on ---+
./makesodebug.sh 2>&1 | tee makesodebug.log
+--- cut off ---+

In makefile I replace line 234:

+--- cut  on ---+
- CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
+ CFLAGS=$(CFLAGS_DEBUG) $(GCFLAGS) $(CFLAGS_SO) $(XCFLAGS)
+--- cut off ---+

and in file base/echogs.c replace line 101, as advised in http://bugs.ghostscript.com/show_bug.cgi?id=689641:

+--- cut  on ---+
- #define LINESIZE 1000+FNSIZE
+ #define LINESIZE 10000+FNSIZE
+--- cut off ---+

...and received the same "segmentation fault".

script and log-file attachement.

Anticipating a request to send the log of gdb, sending it. Note that the error is generated before the call main(), and breakpoints are not working.

Other info:

uname -a:
+--- cut  on ---+
Linux makondo 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 04:38:19 UTC 2010 x86_64 GNU/Linux
+--- cut off ---+

make --version:
+--- cut  on ---+
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
Это свободное ПО; условия копирования - в исходных текстах
Гарантии НЕ предоставляются; в том числе гарантии ценности или пригодности
даже если можно было предположить иное.

Эта программа собрана для x86_64-pc-linux-gnu
+--- cut off ---+

gcc --version:
+--- cut  on ---+
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+--- cut off ---+

Best regards.
Constantine aka Aureliano.
Comment 1 Hin-Tak Leung 2010-04-23 19:52:43 UTC
bug 689641 is irrelevant and really will never be addressed in the way the reporter wanted. what is relevant is that 'make so' currently generates wrong exec and likely affect make sodebug also : http://bugs.ghostscript.com/show_bug.cgi?id=690695
 
In particular, this change you made: 
+--- cut  on ---+
- CFLAGS=$(CFLAGS_STANDARD) $(GCFLAGS) $(XCFLAGS)
+ CFLAGS=$(CFLAGS_DEBUG) $(GCFLAGS) $(CFLAGS_SO) $(XCFLAGS)
+--- cut off ---+

is wrong, and causes the same problem as 690695, because CFLAGS_SO=="fPIC -shared" cannot build executables.
Comment 2 Hin-Tak Leung 2010-04-23 19:56:08 UTC
bug 690695 affects the generates of the final executable. In this bug report, the user himself has made a similarly wrong and more serious change which affects the building of the build utility echogs itself, and hence invalid.
Comment 3 AuR/eliano 2010-04-24 22:12:32 UTC
Created attachment 6226 [details]
patch 6124, adapted for version 8.71

Hello.

This again I am another e-mail.

Thank you. Patch http://bugs.ghostscript.com/attachment.cgi?id=6124, as proposed in bug 690695 helped.

But there it was on version 8.70 and now the current is already 8.71. So why not include a correction to the release?

Best regards.
Constantine aka Aureliano.