Re: [gentoo-user] repair damaged pdf?
Am 14.04.2011 23:30, schrieb Florian Philipp: Am 14.04.2011 23:08, schrieb Liviu Andronic: Dear all What is your experience with corrupted PDF files? Do you know any tool that can attempt to repair damaged PDF files? Does it make any sense to edit a PDF file in hex mode? I have a damaged PDF that cannot be opened with any of the about 10 tools that I've just tried. liv@liv-laptop:/tmp$ pdf2ps Class\ 1.pdf Warning: File has a corrupted %%EOF marker, or garbage after %%EOF. Warning: An error occurred while reading an XREF table. The file has been damaged. This may have been caused by a problem while converting or transfering the file. Ghostscript will attempt to recover the data. Error: /typecheck in --run-- Operand stack: --nostringval-- --nostringval-- 1 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1155/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:20/25(L)-- --dict:1/10(L)-- Current allocation mode is local GPL Ghostscript 8.71: Unrecoverable error, exit code 1 liv@liv-laptop:/tmp$ pdftops Class\ 1.pdf Error: PDF file is damaged - attempting to reconstruct xref table... Error: Top-level pages object is wrong type (null) Error: Couldn't read page catalog Any ideas how I could try to repair it? (It's not sensitive and it's small, so I could post it.) I tried pdftk, but it also fails. liv@liv-laptop:/tmp$ pdftk Class\ 1.pdf output Class\ 11.pdf java.lang.NullPointerException at com.lowagie.text.pdf.PdfReader$PageRefs.iteratePages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.readPages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.init(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader$PageRefs.init(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.readPages(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.readPdf(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.init(itext-2.1.7.jar.so) at com.lowagie.text.pdf.PdfReader.init(itext-2.1.7.jar.so) Error: Unexpected Exception in open_reader() Error: Failed to open PDF file: Class 1.pdf Errors encountered. No output created. Done. Input errors, so no output created. Regards Liviu Well, you could try app-text/qpdf from the benf overlay. It has an option to suppress recovery of damaged files so it looks like it at least tries to repair them per default. If you don't want to install layman and overlays, you can send me the file off-list and I take a look. One good thing about PDF is that its structure is stored uncompressed (AFAIK it only compresses text and binary data with zlib since version 1.2). This means that it might be at least partially recoverable. Regards, Florian Philipp Okay, qpdf cannot handle this. From a quick inspection of the file you provided me off-list it looks like the file is split in two. Right there within 19 0 object it just ends. I guess this file is the product of an aborted download? I guess you could fire up your favorite hex editor and try to add the necessary stream and object end markers, adjust the length indicator for the last object and hope that some tool can then do the rest. However, that's much work for a 36k PDF that is incomplete anyway. Regards, Florian Philipp signature.asc Description: OpenPGP digital signature
[gentoo-user] What's the /dev/* entry for my DVD drive?
Hi, gentoo. I want to mount a CD rom in my SATA DVD drive. Having inserted the CD into the drive, I can't find an entry in /dev for it. I know the drive and the CD are working, because I installed my system using them. :-) My HDDs are on /dev/sda and /dev/sdb. When I stick a USB stick in, it it becomes /dev/sdc. However, my DVD drive is not /dev/sdc, it's not /dev/sdd. I've tried 'ls -lrt /dev', yet there's not entry there after boot time. Would somebody please help me to mount this CD. Thanks! -- Alan Mackenzie (Nuremberg, Germany).
Re: [gentoo-user] What's the /dev/* entry for my DVD drive?
Am 15.04.2011 11:14, schrieb Alan Mackenzie: Hi, gentoo. I want to mount a CD rom in my SATA DVD drive. Having inserted the CD into the drive, I can't find an entry in /dev for it. I know the drive and the CD are working, because I installed my system using them. :-) My HDDs are on /dev/sda and /dev/sdb. When I stick a USB stick in, it it becomes /dev/sdc. However, my DVD drive is not /dev/sdc, it's not /dev/sdd. I've tried 'ls -lrt /dev', yet there's not entry there after boot time. Would somebody please help me to mount this CD. Thanks! It usually is /dev/sr0. There might also be symlinks like /dev/cdrom and /dev/dvd but that depends on udev. Hope this helps, Florian Philipp signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] What's the /dev/* entry for my DVD drive?
Hi, Florian. On Fri, Apr 15, 2011 at 11:27:53AM +0200, Florian Philipp wrote: Am 15.04.2011 11:14, schrieb Alan Mackenzie: Hi, gentoo. I want to mount a CD rom in my SATA DVD drive. Having inserted the CD into the drive, I can't find an entry in /dev for it. I know the drive and the CD are working, because I installed my system using them. :-) My HDDs are on /dev/sda and /dev/sdb. When I stick a USB stick in, it it becomes /dev/sdc. However, my DVD drive is not /dev/sdc, it's not /dev/sdd. I've tried 'ls -lrt /dev', yet there's not entry there after boot time. Would somebody please help me to mount this CD. Thanks! It usually is /dev/sr0. There might also be symlinks like /dev/cdrom and /dev/dvd but that depends on udev. /dev/sr0 it is! I suppose that's mnemonic for Sata cdRom zero. ;-( The symlinks are there, too. Hope this helps, Very much so. Thanks! Florian Philipp -- Alan Mackenzie (Nuremberg, Germany).
[gentoo-user] emerge --depclean removed python 2.6
After a recent update I got python 2.7 installed. The emerge --depclean command removed python 2.6 which I thought would be alright since I now have 2.7. I also used eselect python to set 2.7 as my default. Now revdep-rebuild has a load of broke links that are due to 2.6 being missing. Now vi and other stuff doesn't work. What should be done next? Thanks, dhk
Re: [gentoo-user] emerge --depclean removed python 2.6
On Fri, Apr 15, 2011 at 8:16 PM, dhk dhk...@optonline.net wrote: After a recent update I got python 2.7 installed. The emerge --depclean command removed python 2.6 which I thought would be alright since I now have 2.7. I also used eselect python to set 2.7 as my default. Now revdep-rebuild has a load of broke links that are due to 2.6 being missing. Now vi and other stuff doesn't work. What should be done next? Run python-updater.
Re: [gentoo-user] emerge --depclean removed python 2.6
On 04/15/2011 06:20 AM, Adam Carter wrote: On Fri, Apr 15, 2011 at 8:16 PM, dhk dhk...@optonline.net wrote: After a recent update I got python 2.7 installed. The emerge --depclean command removed python 2.6 which I thought would be alright since I now have 2.7. I also used eselect python to set 2.7 as my default. Now revdep-rebuild has a load of broke links that are due to 2.6 being missing. Now vi and other stuff doesn't work. What should be done next? Run python-updater. I forgot about that command. Thanks.
Re: [gentoo-user] What's the /dev/* entry for my DVD drive?
On Fri, Apr 15, 2011 at 11:10:02AM +0200, Alan Mackenzie wrote: Hi, gentoo. I want to mount a CD rom in my SATA DVD drive. Having inserted the CD into the drive, I can't find an entry in /dev for it. I know the drive and the CD are working, because I installed my system using them. :-) My HDDs are on /dev/sda and /dev/sdb. When I stick a USB stick in, it it becomes /dev/sdc. However, my DVD drive is not /dev/sdc, it's not /dev/sdd. I've tried 'ls -lrt /dev', yet there's not entry there after boot time. Would somebody please help me to mount this CD. Thanks! -- Alan Mackenzie (Nuremberg, Germany). Probably it's /dev/sr0, but you can find out for sure by looking in /dev. -- /\ /\ \ / ^ caveat utilitor 'v-v'
[gentoo-user] Raid1 (continued) mdadm
Hello, New day, and a fresh approach to fixing the raid one install. Following this doc (no lvm no intramfs): http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml The disk were all resync'd (end of last thread). Since this is a simple 3 partition 2 disk mirror (identical drives formatting) and I want to mirror all three (/boot, /, swap) I used these commands: mdadm --create /dev/md127 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1 mdadm --create /dev/md125 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3 mdadm --create /dev/md126 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda2 /dev/sdb2 So do I need to issue these commands? If so, are they correct? A little unclear on mknod livecd ~ # mknod /dev/md127 b 9 1 livecd ~ # mknod /dev/md125 b 9 3 or livecd ~ # mknod /dev/md127 b 9 127 livecd ~ # mknod /dev/md125 b 9 125 livecd ~ # mknod /dev/md126 b 9 126 ???
Re: [gentoo-user] What's the /dev/* entry for my DVD drive?
On Fri, Apr 15, 2011 at 6:32 AM, Alan Mackenzie a...@muc.de wrote: /dev/sr0 it is! I suppose that's mnemonic for Sata cdRom zero. ;-( The symlinks are there, too. Actually, that would be Scsi cdRom. Your SATA devices are treated like SCSI devices.
Re: [gentoo-user] emerge --depclean removed python 2.6
On 15 April 2011 04:16, dhk dhk...@optonline.net wrote: After a recent update I got python 2.7 installed. The emerge --depclean command removed python 2.6 which I thought would be alright since I now have 2.7. I also used eselect python to set 2.7 as my default. Now revdep-rebuild has a load of broke links that are due to 2.6 being missing. Now vi and other stuff doesn't work. What should be done next? Thanks, dhk Hello, I'm using ~amd64 profile, and updated to python 2.7 without any problem. -- Carlos Sura.-
Re: [gentoo-user] [OT] PHP memory problem
On Thursday 14 April 2011 03.12:34 Michael Orlitzky wrote: On 04/13/2011 02:42 PM, Dan Johansson wrote: I know this is Off-topic but I also know there are a lot of smart people lurking on this list. I have a PHP-script that does not run from a web-server but directly in a shell. When I run it I get the following error: # ./dj.php PHP Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 104 bytes) in /usr/local/scripts/includes/dj.inc on line 79 Allowed memory size of 100663296 bytes exhausted (tried to allocate 24 bytes) My scripts starts with: #!/usr/bin/php ?php ini_set('memory_limit', '4192M'); include dj.inc; And in php.ini I have: memory_limit = 1G ; Maximum amount of memory a script may consume Why does PHP not honor my memory limits? I have set 1GB in php.ini and 4192MB (I know that is more then 1GB) and the scripts fails at 100663296 bytes (~ 96MB). I have also tried with other memory settings but I always end up with with the failure at ~96MB. The host has enough RAM (32GB) to support the script. Any suggestions on how to solve the issue (short of rewriting the script in C or C++)? The use of 'G' as a unit was only recently added, in PHP 5.1.0. Try using 'M' instead, and multiplying by 1024. I would also suggest using a number under 4 gigabytes, as you risk overflowing a 32-bit integer. Does '3072M' work? Thanks, that was it. Changing 4G to 4192M in pnp.ini did solve the issue. Regards, -- Dan Johansson, http://www.dmj.nu *** This message is printed on 100% recycled electrons! ***
Re: [gentoo-user] GPU lockup with nouveau driver and accel on
On Thu, Apr 14, 2011 at 09:45, Bill Longman bill.long...@gmail.com wrote: And you are to be complimented on your picture-perfect example of How to Ask a Question. ESR would be proud. thanks, I try ;)
Re: [gentoo-user] Re: GPU lockup with nouveau driver and accel on
On Thu, Apr 14, 2011 at 10:42, walt w41...@gmail.com wrote: I'd ask on the nouveau mailing list, e.g. gmane.comp.freedesktop.xorg.nouveau. The nouveau project is still, well, new, so bug reports are a part of using their drivers. Yeah, I figured I'd hit up here first before getting there and getting lost in the noise ;)
Re: [gentoo-user] [OT] PHP memory problem
On 04/15/2011 11:26 AM, Dan Johansson wrote: On Thursday 14 April 2011 03.12:34 Michael Orlitzky wrote: On 04/13/2011 02:42 PM, Dan Johansson wrote: I know this is Off-topic but I also know there are a lot of smart people lurking on this list. I have a PHP-script that does not run from a web-server but directly in a shell. When I run it I get the following error: # ./dj.php PHP Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 104 bytes) in /usr/local/scripts/includes/dj.inc on line 79 Allowed memory size of 100663296 bytes exhausted (tried to allocate 24 bytes) My scripts starts with: #!/usr/bin/php ?php ini_set('memory_limit', '4192M'); include dj.inc; And in php.ini I have: memory_limit = 1G ; Maximum amount of memory a script may consume Why does PHP not honor my memory limits? I have set 1GB in php.ini and 4192MB (I know that is more then 1GB) and the scripts fails at 100663296 bytes (~ 96MB). I have also tried with other memory settings but I always end up with with the failure at ~96MB. The host has enough RAM (32GB) to support the script. Any suggestions on how to solve the issue (short of rewriting the script in C or C++)? The use of 'G' as a unit was only recently added, in PHP 5.1.0. Try using 'M' instead, and multiplying by 1024. I would also suggest using a number under 4 gigabytes, as you risk overflowing a 32-bit integer. Does '3072M' work? Thanks, that was it. Changing 4G to 4192M in pnp.ini did solve the issue. Regards, Life lesson: if you ever have a PHP problem and think, there's no way that's the problem, nobody is that retarded. That's probably the problem =)
Re: [gentoo-user] Raid1 (continued) mdadm
Am 15.04.2011 16:56, schrieb James: Hello, New day, and a fresh approach to fixing the raid one install. Following this doc (no lvm no intramfs): http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml The disk were all resync'd (end of last thread). Since this is a simple 3 partition 2 disk mirror (identical drives formatting) and I want to mirror all three (/boot, /, swap) I used these commands: mdadm --create /dev/md127 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1 mdadm --create /dev/md125 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3 mdadm --create /dev/md126 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda2 /dev/sdb2 If my theory holds, it should be sufficient if /boot has metadata=0.90 because that's what grub has to access. So do I need to issue these commands? If so, are they correct? A little unclear on mknod livecd ~ # mknod /dev/md127 b 9 1 livecd ~ # mknod /dev/md125 b 9 3 or livecd ~ # mknod /dev/md127 b 9 127 livecd ~ # mknod /dev/md125 b 9 125 livecd ~ # mknod /dev/md126 b 9 126 ??? I doubt you need mknod. Udev should handle this. Maybe you should try it without and see whether udev really creates them. If so, you might still add them to the static /dev. Use something like this: mount --bind / /mnt mknod /mnt/dev/md127 b 9 1 This circumvents udev and writes directly to root. Of course, you have to replace / with whatever is the mount point of your root partition when you boot from a live-CD. Regards, Florian Philipp signature.asc Description: OpenPGP digital signature
[gentoo-user] Re: LibreOffice + GLib-GIO:ERROR:gdbusconnection.c:2279:initable_init: assertion failed
On 04/14/2011 01:21 PM, Carlos Sura wrote: On 13 April 2011 01:49, Daniel Pielmeier bil...@gentoo.org mailto:bil...@gentoo.org wrote: 2011/4/12 Carlos Sura carlos.su...@googlemail.com mailto:carlos.su...@googlemail.com: It might be GLIB? (I've reciently updated) Do you also use the ~amd64 version of glib? What about downgradeing it to the version you had before, should be worth a try and quicker than rebuiding libreoffice on and on. -- Daniel Pielmeier Also, I've tried strace, and this is the output: http://tinypaste.com/e025e0 /usr/bin/libreoffice is just a shell script, not a binary. To capture the full output you need to use the -f flag for strace (follow child processes). I'm on ~amd64 and libreoffice works okay with glib-2.28.6 and dbus-glib-0.92. You can try re-emerging dbus-glib if you haven't already done it.
Re: [gentoo-user] Re: LibreOffice + GLib-GIO:ERROR:gdbusconnection.c:2279:initable_init: assertion failed
On Fri, 15 Apr 2011 13:37:50 -0700, walt wrote: You can try re-emerging dbus-glib if you haven't already done it. This whole glib-dbus thing is a red herring. That error was caused by trying to run LO as root, without an available dbus session. It has nothing to do with the fact that LO won't run as a user. -- Neil Bothwick Barth's Distinction: There are two types of people: those who divide people into two types, and those who don't. signature.asc Description: PGP signature
Re: [gentoo-user] Firefox 4 hard freeze
On Thu, Apr 14, 2011 at 03:47:22PM -0500, Paul Hartman wrote: Update: seems that only some keyboard input is affected. For example, arrow keys for scrolling, and typing things in text/input boxes on webpages are fine. But hotkeys interacting with Firefox, or typing in the Address bar or Search bar freezes the program. Have you tried as a different user or with a fresh Firefox profile? I wonder if it would make a difference. Hum, this morning the problem was still there. I turned off the computer. Tonight I came home, booted it up, and it is no longer a problem. I am not going to pretend I know what just happened. W -- Willie W. Wong ww...@math.princeton.edu Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire et vice versa ~~~ I. Newton
Re: [gentoo-user] Raid1 (continued) mdadm
On Fri, Apr 15, 2011 at 2:47 PM, Florian Philipp li...@binarywings.netwrote: Am 15.04.2011 16:56, schrieb James: Hello, New day, and a fresh approach to fixing the raid one install. Following this doc (no lvm no intramfs): http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml The disk were all resync'd (end of last thread). Since this is a simple 3 partition 2 disk mirror (identical drives formatting) and I want to mirror all three (/boot, /, swap) I used these commands: mdadm --create /dev/md127 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1 mdadm --create /dev/md125 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3 mdadm --create /dev/md126 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda2 /dev/sdb2 If my theory holds, it should be sufficient if /boot has metadata=0.90 because that's what grub has to access. So do I need to issue these commands? If so, are they correct? A little unclear on mknod livecd ~ # mknod /dev/md127 b 9 1 livecd ~ # mknod /dev/md125 b 9 3 or livecd ~ # mknod /dev/md127 b 9 127 livecd ~ # mknod /dev/md125 b 9 125 livecd ~ # mknod /dev/md126 b 9 126 ??? I doubt you need mknod. Udev should handle this. Maybe you should try it without and see whether udev really creates them. If so, you might still add them to the static /dev. Use something like this: mount --bind / /mnt mknod /mnt/dev/md127 b 9 1 This circumvents udev and writes directly to root. Of course, you have to replace / with whatever is the mount point of your root partition when you boot from a live-CD. Regards, Florian Philipp You need mknod during the creation process when booted from a minimal install disc; when you finish building the system and boot it the first time, udev handles it from there. And yes, you're right; only boot needs the --metadata=0.90.