Re: Not able to get the HP AIO scanner working
Hi Maurice, For some reason, I was missing `/usr/local/share/hplip/data/models/models.dat`, and removing and adding back hplip-common restored it. Thanks a lot for the script. I can get rid of scan frontends now. Best, Salil On Wed, Jun 15, 2022 at 12:38 PM Maurice McCarthy wrote: > I use scanimage rather than simple-scan but there the hpaio phrase > must be in quotes. > > In ~/.kshrc I have a function which works fine > > scan() { > if [[ "$1" = "" ]] ; \ > then echo "Please enter a file number" ; return 1; \ > fi ; \ > > /usr/local/bin/scanimage -v -p \ > --device='hpaio:/net/Deskjet_2540_series?ip=192.168.1.132' \ > --format jpeg -x 210 -y 297 --resolution=300 --mode=color \ > >$1.jpg > } > > Best >
Not able to get the HP AIO scanner working
I am trying to get my all-in-one HP scanner working. I don't like mdns and avahi and all that kitchen sink. I prefer printing and scanning using the printer IP address. So, I just installed sane-bakends and hpaio packages. I created the hpaio URI using hp-makeuri -s , and tried to scan using simple-scan and xsane, but both fail with "unable to connect to scanner" error. My scanimage -L also does not show the scanner. To find out what's wrong with sane-backends and hpaio, I printed the sane debug log. sane-backends is correctly passing the scan request to hpaio, but hpaio is not able to locate the scanner. Here is the hpaio log: $ export SANE_DEBUG_HPAIO=128 $ simple-scan hpaio:/net/ENVY_4500_series?ip=192.168.0.211 [05:37:42.189674] [sanei_debug] Setting debug level of hpaio to 128. [05:37:42.194465] [hpaio] sane_hpaio_init(): scan/sane/hpaio.c 356 [05:37:42.194514] [hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 377 [05:37:42.203302] [hpaio] sane_hpaio_open(/net/ENVY_4500_series?ip=192.168.0.211): scan/sane/hpaio.c 395 scan_type=0 scansrc=2149 [05:37:46.106613] [hpaio] sane_hpaio_exit(): scan/sane/hpaio.c 371 Any pointers as to what I am missing?
Re: puzzling nginx behavior on OpenBSD
Hi Buschini, The .cpp entry in the nginx.conf is to make nginx forward that request to the fastcgi application running on 8000 port. I think what you are talking about is for the static html files. Thanks Salil On Mon, Jul 1, 2013 at 2:10 PM, Buschini Edouard m...@ijaal.net wrote: Hello, Correct me if I'm wrong but I think by default in nginx docroot is /htdocs and look at the manual you'll see that by default nginx is started in a chroot in /var/www so you will have to put your index.cpp into /var/www/htdocs directory. Hope I could help you. On Jul 1, 2013 7:56 AM, Salil Wadnerkar rohsh...@gmail.com wrote: Hi, I am testing one C++ fastcgi program on nginx. I modified my nginx config by adding this block: -- /usr/local/share/nginx/nginx.conf --- server { listen 80; server_name localhost; # pass the C++ scripts to FastCGI server listening on 127.0.0.1:8000 # location ~ \.cpp$ { fastcgi_pass 127.0.0.1:8000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; includefastcgi_params; } I run my fastcgi application using spawn-fcgi: spawn-fcgi -p 8000 -n cppreadings And I access the cpp url like this: curl http://localhost/index.cpp But, I get the error that the URL is not available and my nginx error log shows: -- /var/www/logs/error.log --- 2013/07/01 21:21:07 [error] 28733#0: *1 open() /htdocs/index.cpp failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /index.cpp HTTP/1.1, host: localhost I am puzzled as to why it is taking the URL as /htdocs/index.cpp and probably, that is the reason why it is failing. I can attach my nginx.conf, if anybody wants to view the complete config. But, basically the above is the only change I made to the default nginx config. I am using the exact same config on Mac OS X and Arch Linux and it is working there. So, that'w why I am posting it in OpenBSD forum rather than nginx forum. Thanks Salil
Re: puzzling nginx behavior on OpenBSD
Hi, I specified the root explicitly (I think, by default it looks into /var/www/htdocs), but that did not help. I started the nginx in unsafe mode (non-chrooted mode) by specifying the -u flag. I also tried unix socket communication between nginx and fastcgi with the socket file in /var/www/ directory (though, the location is not important in a non-chrooted mode), but that did not help either. Anyway, thank you all of you for trying to help. I have deeper understanding of nginx and OpenBSD now. best regards Salil On Mon, Jul 1, 2013 at 11:08 PM, openda...@hushmail.com wrote: Maybe you'll have more luck trying out the Nginx port (/etc/rc.d/enginx) rather than the default chrooted one? http://openbsd.7691.n7.nabble.com/Ruby-on-Rails-and-the-chrooted-nginx-8-td229745.html O.D. On 1. juli 2013 at 5:57 AM, Salil Wadnerkar rohsh...@gmail.com wrote: Hi, I am testing one C++ fastcgi program on nginx. I modified my nginx config by adding this block: -- /usr/local/share/nginx/nginx.conf --- server { listen 80; server_name localhost; # pass the C++ scripts to FastCGI server listening on 127.0.0.1:8000 # location ~ \.cpp$ { fastcgi_pass 127.0.0.1:8000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; includefastcgi_params; } I run my fastcgi application using spawn-fcgi: spawn-fcgi -p 8000 -n cppreadings And I access the cpp url like this: curl http://localhost/index.cpp But, I get the error that the URL is not available and my nginx error log shows: -- /var/www/logs/error.log --- 2013/07/01 21:21:07 [error] 28733#0: *1 open() /htdocs/index.cpp failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /index.cpp HTTP/1.1, host: localhost I am puzzled as to why it is taking the URL as /htdocs/index.cpp and probably, that is the reason why it is failing. I can attach my nginx.conf, if anybody wants to view the complete config. But, basically the above is the only change I made to the default nginx config. I am using the exact same config on Mac OS X and Arch Linux and it is working there. So, that'w why I am posting it in OpenBSD forum rather than nginx forum. Thanks Salil
puzzling nginx behavior on OpenBSD
Hi, I am testing one C++ fastcgi program on nginx. I modified my nginx config by adding this block: -- /usr/local/share/nginx/nginx.conf --- server { listen 80; server_name localhost; # pass the C++ scripts to FastCGI server listening on 127.0.0.1:8000 # location ~ \.cpp$ { fastcgi_pass 127.0.0.1:8000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; includefastcgi_params; } I run my fastcgi application using spawn-fcgi: spawn-fcgi -p 8000 -n cppreadings And I access the cpp url like this: curl http://localhost/index.cpp But, I get the error that the URL is not available and my nginx error log shows: -- /var/www/logs/error.log --- 2013/07/01 21:21:07 [error] 28733#0: *1 open() /htdocs/index.cpp failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: GET /index.cpp HTTP/1.1, host: localhost I am puzzled as to why it is taking the URL as /htdocs/index.cpp and probably, that is the reason why it is failing. I can attach my nginx.conf, if anybody wants to view the complete config. But, basically the above is the only change I made to the default nginx config. I am using the exact same config on Mac OS X and Arch Linux and it is working there. So, that'w why I am posting it in OpenBSD forum rather than nginx forum. Thanks Salil
How do I compile 32-bit binaries on amd64 OpenBSD?
Hi, Some programs like smlnj, which is SML by New Jersey, support only 32-bit binaries. On Linux distros, I can use gcc multilib support. How do I do that in OpenBSD? I installed gcc-4.7.2 package and used that to compile to see whether I can get it to generate a 32-bit binary. $ egcc -m32 hello.c -o hello /usr/bin/ld: warning: i386 architecture of input file `/tmp//ccMULgjf.o' is incompatible with i386:x86-64 output So, it seems to use the system linker. To confirm that: $ egcc -v Using built-in specs. COLLECT_GCC=egcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-openbsd5.2/4.7.2/lto-wrapper Target: x86_64-unknown-openbsd5.2 Configured with: /usr/obj/gcc-4.7.2/gcc-4.7.2/configure --verbose --program-transform-name='s,^,e,' --disable-nls --disable-checking --with-system-zlib --disable-libmudflap --disable-libgomp --disable-tls --with-as=/usr/bin/as --with-ld=/usr/bin/ld --with-gnu-ld --with-gnu-as --enable-threads=posix --enable-wchar_t --with-gmp=/usr/local --disable-libstdcxx-pch --enable-languages=c,c++,fortran,objc,ada --enable-cpp --enable-shared --prefix=/usr/local --sysconfdir=/etc --mandir=/usr/local/man --infodir=/usr/local/info --localstatedir=/var --disable-silent-rules Thread model: posix gcc version 4.7.2 (GCC) Do I have to build gcc-4.7.2 from ports with multilib support? For simple programs, export CFLAGS=-m32 export LDFLAGS=-m32 works. But, if I want to compile something like sml-nj, then the make fails. Thanks Salil
Re: How do I compile 32-bit binaries on amd64 OpenBSD?
Thanks Peter. I found that many autotools packaged programs out there expect newer gcc environments. So, when I run ./configure make make install most of the time, make fails because the system gcc toolchain is old. I tried using a newer toolchain by setting the environment variables: export CC=egcc export CPP=egcc-cpp export MAKE=gmake But, libtool is picked up from the /usr/bin instead of /usr/local/bin. Can somebody guide me about how I can use the sandboxed gcc environment to build programs? Thanks Salil On Tue, Jan 22, 2013 at 5:43 PM, Peter Hessler phess...@openbsd.org wrote: On 2013 Jan 22 (Tue) at 17:37:18 +0800 (+0800), Salil Wadnerkar wrote: :Hi, : :Some programs like smlnj, which is SML by New Jersey, support only 32-bit :binaries. On Linux distros, I can use gcc multilib support. How do I do :that in OpenBSD? OpenBSD does not support multilib, and has no intention to. Fix the code so it works on 64bit systems. -- The National Short-Sleeved Shirt Association says: Support your right to bare arms!
Re: How do I compile 32-bit binaries on amd64 OpenBSD?
Thanks Amit for pointers. Helpful indeed. On Tue, Jan 22, 2013 at 11:12 PM, Amit Kulkarni amitk...@gmail.com wrote: On Tue, Jan 22, 2013 at 3:37 AM, Salil Wadnerkar rohsh...@gmail.com wrote: Hi, Some programs like smlnj, which is SML by New Jersey, support only 32-bit binaries. On Linux distros, I can use gcc multilib support. How do I do that in OpenBSD? in general, if a port exists look at the Makefile for hints. smlnj was updated within the last few weeks and is marked i386 only. so you can use it on i386 only. www.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/lang/smlnj/Makefile you can checkout 10 min delayed commits to the src, ports, xenocara trees on here www.openbsd.org/cgi-bin/cvsweb/ some people here use openports.se to quickly see if a port exists.
Re: How do I compile 32-bit binaries on amd64 OpenBSD?
Hi Brad, You may be right. I am trying to build a standard ML implementation on my 64-bit machine. This is because the only SML implementation in the ports is smlnj, which works beautifully on 32-bit architecture, but is not supported on 64-bit one. I tried polyml, which is the next popular SML implementation - built using autotools. http://www.polyml.org/. (Download: http://sourceforge.net/projects/polyml/) $ gmake ... libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -I../libffi/include -MT x86_dep.lo -MD -MP -MF .deps/x86_dep.Tpo -c x86_dep.cpp -fPIC -DPIC -o .libs/x86_dep.o x86_dep.cpp: In member function 'virtual bool X86Dependent::GetPCandSPFromContext(TaskData*, sigcontext*, PolyWord*, byte*)': x86_dep.cpp:906: error: 'struct sigcontext' has no member named 'sc_pc' x86_dep.cpp:907: error: 'struct sigcontext' has no member named 'sc_sp' gmake[2]: *** [x86_dep.lo] Error 1 gmake[2]: Leaving directory `/home/salil/polyml.5.5/libpolyml' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/home/salil/polyml.5.5' gmake: *** [all] Error 2 From this link: http://gcc.gnu.org/ml/java/2008-04/msg00080.html it looks like the problem is due to wrong/old glibc headers. I tried other SML implementations - moscow ML, MLton, etc and they fail to build. But these ones did have some Linux specific assumptions in their Makefiles. So, it was not surprising. But, polyML looks like an implementation that is well-tested on many platforms. So, I was hoping it would build. Thanks Salil On Wed, Jan 23, 2013 at 5:28 AM, Brad Smith b...@comstyle.com wrote: - Original message - Thanks Peter. I found that many autotools packaged programs out there expect newer gcc environments. I'd love to what programs these are. I haven't run into these many programs, only a very small few. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Re: How do I compile 32-bit binaries on amd64 OpenBSD?
I know SML is not really an industrial programming language. And one is better off using OCaml. I am attending one course from coursera.org called 'Programming languages' where I need to use SML. On Wed, Jan 23, 2013 at 6:53 AM, Marc Espie es...@nerim.net wrote: On Wed, Jan 23, 2013 at 06:32:16AM +0800, Salil Wadnerkar wrote: Hi Brad, You may be right. I am trying to build a standard ML implementation on my 64-bit machine. This is because the only SML implementation in the ports is smlnj, which works beautifully on 32-bit architecture, but is not supported on 64-bit one. I tried polyml, which is the next popular SML implementation - built using autotools. http://www.polyml.org/. (Download: http://sourceforge.net/projects/polyml/) $ gmake ... libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -Wall -O3 -I../libffi/include -MT x86_dep.lo -MD -MP -MF .deps/x86_dep.Tpo -c x86_dep.cpp -fPIC -DPIC -o .libs/x86_dep.o x86_dep.cpp: In member function 'virtual bool X86Dependent::GetPCandSPFromContext(TaskData*, sigcontext*, PolyWord*, byte*)': x86_dep.cpp:906: error: 'struct sigcontext' has no member named 'sc_pc' x86_dep.cpp:907: error: 'struct sigcontext' has no member named 'sc_sp' gmake[2]: *** [x86_dep.lo] Error 1 gmake[2]: Leaving directory `/home/salil/polyml.5.5/libpolyml' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/home/salil/polyml.5.5' gmake: *** [all] Error 2 From this link: http://gcc.gnu.org/ml/java/2008-04/msg00080.html it looks like the problem is due to wrong/old glibc headers. glibc ? what's that... sigcontext is some new fangled posix thingy, if I remember right. You can probably try to port some implementation over from say, FreeBSD. it's not really surprising to find this kind of code in a sml implementation. I'm more disappointed in smlnj. This is a toy implementation. You can't really say you're an actual programming language in 2013 if you still don't support 64 bits architectures... (points at ocaml, which is still an ml, though not sml, and is probably the only widely used implementation of any ml outside of academia)
firefox crashes
Hi, On my amd64 machine, firefox crashes regularly after some time. Here is the info about the crash: gdb /usr/local/bin/firefox firefox.core GNU gdb 6.3 This GDB was configured as amd64-unknown-openbsd5.2...(no debugging symbols found) ... Core was generated by `firefox'. Program terminated with signal 11, Segmentation fault. (gdb) where #0 0x0002053d4d4a in kill () at stdin:2 #1 0x000200cc6f12 in XRE_InstallX11ErrorHandler () from /usr/local/lib/firefox-18.0/libxul.so.37.0 #2 signal handler called #3 0x000202163fe9 in JS_DefineProfilingFunctions () from /usr/local/lib/firefox-18.0/libxul.so.37.0 #4 0x00020168a8d7 in non-virtual thunk to js::DirectWrapper::toWrapper() () from /usr/local/lib/firefox-18.0/libxul.so.37.0 #5 0x0002021607a6 in JS_DefineProfilingFunctions () from /usr/local/lib/firefox-18.0/libxul.so.37.0 #6 0x0002021099f0 in JS_DefineDebuggerObject () from /usr/local/lib/firefox-18.0/libxul.so.37.0 #7 0x000202163ecd in JS_DefineProfilingFunctions () from /usr/local/lib/firefox-18.0/libxul.so.37.0 $ uname -a OpenBSD passport.my.domain 5.2 GENERIC.MP#17 amd64 I am on OpenBSD current and I have my system and packages updated just yesterday. Thanks Salil
How to delete this partial package?
Hi, I am on OpenBSD current. While upgrading my packages from 5.1, I tried to add a package gnutls that was already there and due to some error, a partial package got created - partial-gnutls. When I try to delete this partial package, I get these errors: File /usr/local/share/locale/cs/LC_MESSAGES/pkg.qX9SMkCPZb does not exist File /usr/local/share/locale/de/LC_MESSAGES/pkg.Dfpr8PbT3X does not exist File /usr/local/share/locale/en@boldquot/LC_MESSAGES/pkg.wIH7fQJbhK does not exist File /usr/local/share/locale/en@quot/LC_MESSAGES/pkg.c8llMmPSGl does not exist Read failed: Input/output error at /usr/libdata/perl5/OpenBSD/md5.pm line 59 I checked the source code. It is some coe that adds a file into some data structure (most probably, it is finding out which files to delete) and it fails to do so because the file is no longer there. How do I get rid of this partial package? Thanks Salil
Re: How to delete this partial package?
Hi Francisco, I am going to test my disk using Philip's suggestion. But, I am not sure I am following you. Are you suggesting me to update my current because this problem was found and fixed lately or you are just suggesting so because it's a good practice to keep our copy updated? Thanks Salil On Wed, Oct 24, 2012 at 11:59 AM, Francisco Valladolid H. fic...@gmail.com wrote: Hi. you have to update your -current version of OpenBSD also. both kernel and system base. Regards. On Tue, Oct 23, 2012 at 10:31 PM, Philip Guenther guent...@gmail.com wrote: On Tue, Oct 23, 2012 at 7:44 PM, Salil Wadnerkar rohsh...@gmail.com wrote: When I try to delete this partial package, I get these errors: ... File /usr/local/share/locale/en@quot/LC_MESSAGES/pkg.c8llMmPSGl does not exist Read failed: Input/output error at /usr/libdata/perl5/OpenBSD/md5.pm line 59 I checked the source code. It is some coe that adds a file into some data structure (most probably, it is finding out which files to delete) and it fails to do so because the file is no longer there. How do I get rid of this partial package? The error message Input/output error indicates that the error is for some other file which does exist but for which the kernel is reporting an I/O error. That suggests that you have some sort of disk problem. Has the kernel reported anything to dmesg? If dmesg doesn't show anything, then I would fsck all your filesystems and, if that doesn't find anything, do a read check by dd'ing the raw partitions to /dev/null and see what that turns up. Philip Guenther -- Francisco Valladolid H. -- http://blog.bsdguy.net - Jesus Christ follower.