LPRng

Request a package to be made here. Make sure you have searched before requesting.

LPRng

Postby craigfrancis » Sat Jan 26, 2013 6:24 pm

Probably not an issue with archlinuxarm, but having downloaded LPRng from:

http://www.lprng.com/DISTRIB/LPRng/LPRng-3.8.35.tgz

This is on a RaspberryPi (armv6h), the ./configure seems to go well, but the following returns very quickly:

$this->bbcode_second_pass_code('', '
# make install
Segmentation fault (core dumped)
')

Likewise with `make clean`.

----

On a side note, I did also try installing `psutils`, which seemed to be the only package that mentions it proving `lprng`:

https://www.archlinux.org/packages/extr ... 4/psutils/

However I'm pretty sure I have misunderstood something, as I can't find the `ld` program (or related files).

Otherwise there is a `lprng` package from AUR (Arch User Repository):

https://aur.archlinux.org/packages/lprng/

Where I suspect (if the above is the wrong approach) I may need to follow the instructions from:

http://archlinuxarm.org/developers/building-packages
craigfrancis
 
Posts: 4
Joined: Sat Jan 26, 2013 6:20 pm

Re: LPRng

Postby craigfrancis » Sat Jan 26, 2013 7:01 pm

Having downloaded:

https://aur.archlinux.org/packages/lp/l ... rng.tar.gz
https://aur.archlinux.org/packages/lprng/

And run:

$this->bbcode_second_pass_code('', 'makepkg --asroot -Acs')

I'm getting the following:

$this->bbcode_second_pass_code('', '
/bin/sh ../libtool --mode=compile gcc -I.. -I. -I./include -I./common -D_FILE_OFFSET_BITS=64 -I/usr/include -g -W -Wall -Werror -Wno-unused -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -g -W -Wall -Werror -Wno-unused -DHAVE_CONFIG_H -c ./common/getqueue.c
libtool: compile: gcc -I.. -I. -I./include -I./common -D_FILE_OFFSET_BITS=64 -I/usr/include -g -W -Wall -Werror -Wno-unused -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -g -W -Wall -Werror -Wno-unused -DHAVE_CONFIG_H -c ./common/getqueue.c -o getqueue.o
./common/getqueue.c: In function 'Trim_status_file':
./common/getqueue.c:1700:13: error: ignoring return value of 'ftruncate', declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
make[1]: *** [getqueue.lo] Error 1
make[1]: Leaving directory `/usr/src/lprng/src/LPRng-3.8.35/src'
make: *** [src] Error 2
')

The source code of "./src/common/getqueue.c" does indeed have a call to ftruncate() on line 1700:

$this->bbcode_second_pass_code('', 'ftruncate( status, 0 );')

Which I suspect in most cases does not cause the `make` process to stop... it seems that its normally an ignored error.

I could theoretically use it in something like an if() {}, but suspect its due to the compile options that actually stops it, which I think the culprit is:

-Wno-unused

Can anyone confirm if this is the case, and how I should proceed.
craigfrancis
 
Posts: 4
Joined: Sat Jan 26, 2013 6:20 pm

Re: LPRng

Postby craigfrancis » Sat Jan 26, 2013 7:39 pm

By request from `scientes_` in IRC, with the segfault issue with `make`, the following backtrace was obtained:

$this->bbcode_second_pass_code('', '
# gdb --args make

GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "armv6l-unknown-linux-gnueabihf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/make...(no debugging symbols found)...done.
')
$this->bbcode_second_pass_code('', '
(gdb) run
Starting program: /usr/bin/make
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb6f034b4 in strlen () from /usr/lib/libc.so.6
')
$this->bbcode_second_pass_code('', '
(gdb) bt
#0 0xb6f034b4 in strlen () from /usr/lib/libc.so.6
#1 0x00015ee4 in ?? ()
#2 0x00015ee4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
')
$this->bbcode_second_pass_code('', '
(gdb) info registers
r0 0x0 0
r1 0x0 0
r2 0x6966 26982
r3 0x0 0
r4 0xae 174
r5 0x22 34
r6 0x7 7
r7 0x34a38 215608
r8 0xbeffdee8 3204439784
r9 0x33f10 212752
r10 0x0 0
r11 0xbeffe05c 3204440156
r12 0x3380c 210956
sp 0xbeffdee8 0xbeffdee8
lr 0x15ee4 89828
pc 0xb6f034b4 0xb6f034b4 <strlen+4>
cpsr 0x40000010 1073741840
')
$this->bbcode_second_pass_code('', '
(gdb) disassemble
Dump of assembler code for function strlen:
0xb6f034b0 <+0>: bic r1, r0, #3
=> 0xb6f034b4 <+4>: ldr r2, [r1], #4
0xb6f034b8 <+8>: ands r3, r0, #3
0xb6f034bc <+12>: rsb r0, r3, #0
0xb6f034c0 <+16>: beq 0xb6f034d8 <strlen+40>
0xb6f034c4 <+20>: orr r2, r2, #255 ; 0xff
0xb6f034c8 <+24>: subs r3, r3, #1
0xb6f034cc <+28>: orrgt r2, r2, #65280 ; 0xff00
0xb6f034d0 <+32>: subs r3, r3, #1
0xb6f034d4 <+36>: orrgt r2, r2, #16711680 ; 0xff0000
0xb6f034d8 <+40>: tst r2, #255 ; 0xff
0xb6f034dc <+44>: tstne r2, #65280 ; 0xff00
0xb6f034e0 <+48>: tstne r2, #16711680 ; 0xff0000
0xb6f034e4 <+52>: tstne r2, #-16777216 ; 0xff000000
0xb6f034e8 <+56>: addne r0, r0, #4
0xb6f034ec <+60>: ldrne r2, [r1], #4
0xb6f034f0 <+64>: bne 0xb6f034d8 <strlen+40>
0xb6f034f4 <+0>: tst r2, #255 ; 0xff
0xb6f034f8 <+4>: addne r0, r0, #1
0xb6f034fc <+8>: tstne r2, #65280 ; 0xff00
0xb6f03500 <+12>: addne r0, r0, #1
0xb6f03504 <+16>: tstne r2, #16711680 ; 0xff0000
0xb6f03508 <+20>: addne r0, r0, #1
0xb6f0350c <+24>: bx lr
End of assembler dump.
')
craigfrancis
 
Posts: 4
Joined: Sat Jan 26, 2013 6:20 pm

Re: LPRng

Postby craigfrancis » Sat Jan 26, 2013 8:23 pm

Not sure whats different, but after deleting the source code from lprng.org, and re-downloading, then re-running:

$this->bbcode_second_pass_code('', '
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --disable-force_localhost
make
make install
')

This all seemed to work this time.

I suspect something else has changed, perhaps where I have installed "psutils":

$this->bbcode_second_pass_code('', 'pacman -S psutils')

Or maybe one of the debug packages:

$this->bbcode_second_pass_code('', '
pacman -S patch
pacman -S backtrace
pacman -S gdb
')
craigfrancis
 
Posts: 4
Joined: Sat Jan 26, 2013 6:20 pm


Return to Package Requests

Who is online

Users browsing this forum: No registered users and 20 guests

cron