Roger's woze

February 21, 2012

visual studio 2010 express 64 bit woe

Filed under: Uncategorized — rogerdpack @ 3:47 pm

1>MSVCRTD.lib(ti_inst.obj) : fatal error LNK1112: module machine type ‘X86′ conflicts with target machine type ‘x64′

this meant “you properties -> VC++ Directories -> Library Directories” is pointing to a directory that has 32 bit libs built in it. Fix somehow!

In my case http://social.msdn.microsoft.com/Forums/ar/vcgeneral/thread/c747cd6f-32be-4159-b9d3-d2e33d2bab55

February 17, 2012

jna unsigned char

Filed under: Uncategorized — rogerdpack @ 11:43 am

just use a byte it “should work”

ref: http://en.wikipedia.org/wiki/Java_Native_Interface#Mapping_types

http://jna.java.net/javadoc/overview-summary.html#marshalling

February 16, 2012

jnaerator woe

Filed under: Uncategorized — rogerdpack @ 2:31 pm

Exception in thread “main” java.lang.Error: Exception reading field ‘interface_id’ in class sg_io_hdr_t: java.lang.IllegalAccessException: Class com.sun.jna.Structure can not access a member of class sg_io_hdr_t with modifiers “public”
at com.sun.jna.Structure.getField(Structure.java:468)
at com.sun.jna.Structure.calculateSize(Structure.java:788)
at com.sun.jna.Structure.allocateMemory(Structure.java:290)
at com.sun.jna.Structure.<init>(Structure.java:177)
at com.sun.jna.Structure.<init>(Structure.java:167)
at com.sun.jna.Structure.<init>(Structure.java:163)
at com.sun.jna.Structure.<init>(Structure.java:154)
at com.ochafik.lang.jnaerator.runtime.Structure.<init>(Structure.java:29)
at sg_io_hdr_t.<init>(Yo.java:124)
at Yo.sendScsiCommand(Yo.java:64)
at Yo.rewindTape(Yo.java:38)
at Yo.main(Yo.java:33)

 

meant “you need to make that class public or it won’t instantiate right [I guess]“

jna woe

Filed under: Uncategorized — rogerdpack @ 1:13 pm

javac -cp \*.jar Yo.java
Yo.java:2: package com.sun.jna does not exist
import com.sun.jna.Library;
^
Yo.java:3: package com.sun.jna does not exist
import com.sun.jna.Native;
^
Yo.java:4: package com.sun.jna does not exist
import com.sun.jna.Platform;
^
Yo.java:5: package com.sun.jna does not exist
import com.sun.jna.Pointer;
^
Yo.java:6: package com.ochafik.lang.jnaerator.runtime does not exist
import com.ochafik.lang.jnaerator.runtime.Structure;
^
Yo.java:7: package com.sun.jna does not exist
import com.sun.jna.Pointer;
^
Yo.java:15: cannot find symbol
symbol : class Library
location: class Yo
public interface CLibrary extends Library {
^
Yo.java:49: cannot find symbol
symbol: class Structure
class sg_io_hdr_t extends Structure<sg_io_hdr_t, sg_io_hdr_t.ByValue, sg_io_hdr_t.ByReference > {
^
Yo.java:92: package Structure does not exist
public static class ByValue extends sg_io_hdr_t implements Structure.ByValue {
^
Yo.java:89: package Structure does not exist
public static class ByReference extends sg_io_hdr_t implements Structure.ByReference {
^
Yo.java:57: cannot find symbol
symbol : class Pointer
location: class sg_io_hdr_t
public Pointer dxferp;
^
Yo.java:59: cannot find symbol
symbol : class Pointer
location: class sg_io_hdr_t
public Pointer cmdp;
^
Yo.java:61: cannot find symbol
symbol : class Pointer
location: class sg_io_hdr_t
public Pointer sbp;
^
Yo.java:66: cannot find symbol
symbol : class Pointer
location: class sg_io_hdr_t
public Pointer usr_ptr;
^
Yo.java:17: cannot find symbol
symbol : variable Platform
location: interface Yo.CLibrary
Native.loadLibrary((Platform.isWindows() ? “msvcrt” : “c”),
^
Yo.java:17: cannot find symbol
symbol : variable Native
location: interface Yo.CLibrary
Native.loadLibrary((Platform.isWindows() ? “msvcrt” : “c”),
^
Yo.java:81: cannot find symbol
symbol : method setFieldOrder(java.lang.String[])
location: class sg_io_hdr_t
setFieldOrder(new String[]{“interface_id”, “dxfer_direction”, “cmd_len”, “mx_sb_len”, “iovec_count”, “dxfer_len”, “dxferp”, “cmdp”, “sbp”, “timeout”, “flags”, “pack_id”, “usr_ptr”, “status”, “masked_status”, “msg_status”, “sb_len_wr”, “host_status”, “driver_status”, “resid”, “duration”, “info”});
^
Yo.java:87: cannot find symbol
symbol : variable Structure
location: class sg_io_hdr_t
return Structure.newArray(sg_io_hdr_t.class, arrayLength);
^
18 errors

 

meant “you don’t have all the jars in your classpath, do it like this intead” (I guess..bash woe?)
$ javac -cp jna.jar:jnaerator-0.9.10-SNAPSHOT-shaded.jar Yo.java

automatic swig-like JNA converter

Filed under: Uncategorized — rogerdpack @ 12:26 pm

http://code.google.com/p/jnaerator/ apparently

better than quicksilver (OS X)

Filed under: Uncategorized — rogerdpack @ 7:10 am

I think what you want is “alfred” http://itunes.apple.com/us/app/alfred/id405843582?mt=12

February 10, 2012

end-of-data detected scsi sense data

Filed under: Uncategorized — rogerdpack @ 2:33 pm

this with an on drive verify “error” sense data response of

f0 00 08 00 00 00 01 12 00 00
00 00 00 05 00 00 00 00 32 05
10 01 00 00 00 00

(08 00 05) meant “when passing in the verify command, you have too many values in the length field, so it’s expecting more files than are on tape” and erring.

February 9, 2012

visual studio express how to bundle visual studio msvcrt redistributable

Filed under: Uncategorized — rogerdpack @ 9:29 am

looks like if it’s with inno setup, it’s either execute the msi file or “static link” against msvcrt10.dll (et al)

http://stackoverflow.com/questions/2461848/distributing-vc-redist-running-installer-when-already-installed-causes-prob

Apparently microsoft frowns on static linking dunno why.

February 8, 2012

t10000kc woe

Filed under: Uncategorized — rogerdpack @ 3:03 pm

Block size: 10
Number of Blocks Per File: 1
Number of files: 1
Command: 12 duration=0 millisecs transfer len=53
Inquiry: STK T10000C 1.51
Command: 1a duration=1 millisecs transfer len=107
Mode sense: 0 0 8 4c 0 0 0 0 0 0 0 4a f0 0 4 0 0 0 0
Buffered mode off
Logical block protection mode: 0
Select command block: 15 10 00 00 14 00
Select parms: 00 00 00 08 4c 00 00 00 00 00
00 00 4a f0 00 04 f1 04 c0 00
Command: 15 duration=0 millisecs transfer len=0
Command: 1a duration=1 millisecs transfer len=107
Mode sense: 0 0 8 4c 0 0 0 0 0 0 0 4a f0 0 4 f1 4 c0 0
Buffered mode off
Logical block protection mode: f1
Protect length: 4
Include protection info during writing
Include protection info during reading
Command: 1 duration=1 millisecs transfer len=0
Rewind tape. rc=0
data 259358736 lengh 6CRC = e9dc0661
ERROR!!! Command: a
Sense data: f0 00 04 00 00 00 0a 12 00 00
00 00 10 01 00 00 00 00 2a 07
10 01 00 00 00 00
SCSI status=0×2
Driver status=0×8
Write block. rc=2
Error writing block
ERROR!!! Command: 10
Sense data: f0 00 03 00 00 00 00 12 00 00
00 00 0c 00 00 00 00 00 00 00
10 01 00 00 00 00
SCSI status=0×2
Driver status=0×8
Write file mark. rc=2
Error writing file mark
Command: 1 duration=38 millisecs transfer len=0
Rewind tape. rc=0
Reading a block
ERROR!!! Command: 8
Sense data: f0 00 08 00 00 00 0a 12 00 00
00 00 00 05 00 00 00 00 32 05
10 01 00 00 00 00
SCSI status=0×2
Driver status=0×8
Read block. rc=2
Error reading block
Seconds to write: 12
Command: 1 duration=8 millisecs transfer len=0
Rewind tape. rc=0
ERROR!!! Command: 13
Sense data: f0 00 08 00 7f ff ff 12 00 00
00 00 00 05 00 00 00 00 32 05
10 01 00 00 00 00
SCSI status=0×2
Driver status=0×8
Verify tape. rc=2
Error verifying tape
Seconds to verify: 0
Select command block: 15 10 00 00 14 00
Select parms: 00 00 00 08 4c 00 00 00 00 00
00 00 4a f0 00 04 00 00 00 00
Command: 15 duration=9 millisecs transfer len=0
Command: 1a duration=0 millisecs transfer len=107
Mode sense: 0 0 8 4c 0 0 0 0 0 0 0 4a f0 0 4 0 0 0 0
Buffered mode off
Logical block protection mode: 0

 

meant “you’re not writing it with the correct crc32 in there”

Python’s multiprocessing for ruby

Filed under: Uncategorized — rogerdpack @ 2:30 pm

see https://github.com/pmahoney/process_shared

Older Posts »

Powered by WordPress