Dec 092009
 

MacPorts – Problem installing py26-pyusb

I was trying to install the pyusb package on my MacBook Pro. I have MacPorts installed and there is an available port. But when I tried to install py26-pyusb, I received the following error:

--->  Building py26-pyusb
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-pyusb/work/pyusb-0.4.2" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned error 1
Command output: pyusb.c:1750: warning: implicit declaration of function 'usb_get_string'
pyusb.c:1750: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c: In function 'Py_usb_DeviceHandle_getDescriptor':
pyusb.c:1811: warning: implicit declaration of function 'usb_get_descriptor'
pyusb.c:1811: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c:1813: warning: implicit declaration of function 'usb_get_descriptor_by_endpoint'
pyusb.c:1813: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c: In function 'Py_usb_DeviceHandle_del':
pyusb.c:1988: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c:1991: error: 'Py_usb_DeviceHandle' has no member named 'interfaceClaimed'
pyusb.c:1992: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c:1993: error: 'Py_usb_DeviceHandle' has no member named 'interfaceClaimed'
pyusb.c:1996: warning: implicit declaration of function 'usb_close'
pyusb.c:1996: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c: In function 'new_DeviceHandle':
pyusb.c:2062: warning: implicit declaration of function 'usb_open'
pyusb.c:2062: warning: assignment makes pointer from integer without a cast
pyusb.c:2070: error: 'Py_usb_DeviceHandle' has no member named 'deviceHandle'
pyusb.c:2071: error: 'Py_usb_DeviceHandle' has no member named 'interfaceClaimed'
pyusb.c: In function 'busses':
pyusb.c:2090: warning: implicit declaration of function 'usb_find_busses'
pyusb.c:2095: warning: implicit declaration of function 'usb_find_devices'
pyusb.c:2100: warning: implicit declaration of function 'usb_get_busses'
pyusb.c:2100: warning: assignment makes pointer from integer without a cast
pyusb.c:2107: error: dereferencing pointer to incomplete type
pyusb.c:2111: error: dereferencing pointer to incomplete type
pyusb.c:2112: warning: passing argument 1 of 'new_Bus' from incompatible pointer type
pyusb.c: In function 'initusb':
pyusb.c:2172: warning: implicit declaration of function 'usb_init'
error: command '/usr/bin/gcc-4.2' failed with exit status 1

Error: Status 1 encountered during processing.

Tracked the problem down to a minor bug in the setup.py file that is used during the build process. On my Mac this was located in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-pyusb/work/pyusb-0.4.2. Here was the problem area:

elif -1 != platform.find("darwin"):
    extra_link_args = ['-framework',
                       'CoreFoundation',
                       '-framework',
                       'IOKit',
                       '-L/sw/lib',
                       '-L/usr/local/lib']
    extra_compile_args = ['-I/sw/include','-I/usr/local/lib']

This line:

extra_compile_args = ['-I/sw/include','-I/usr/local/lib']

should read

extra_compile_args = ['-I/opt/local/include','-I/usr/local/lib']

.

Triathlon Training, day 73

Today just had a field test at the track. I didn’t get to go do this until after work, after the farmer’s market, so it was dark and COLD at the Atascocita High School track. I’m not complaining, at least the gate wasn’t locked!

Just had to warm up for 1200 m and then run for 8 minutes and record everything. All went well except that I’ve just replaced my old Garmin FR 305 with a 310XT and I didn’t realize that one of the training options (autolap each mile) was enabled by default. So what was supposed to be lap 2 (the 8 minute run) is actually lap 2 and 3, with a pause in between them caused by me looking at the darn thing to figure out what was going on.

OK, keeping all that in mind, here is the data I was supposed to record:

Heart Rate (max): 160 b/m
Heart Rate (avg): 156 b/m
Duration: 06:53 (was supposed to be 8 minutes, see above)
Distance: 1.00 mi
Temperature: about 40 degrees F
Fatigue: Not sure what to put for this.  Felt OK.
Feb 202006
 

In preparation for Mikie’s and Chelsea’s upcoming trip to Italy, we are all trying to learn some basic Italian. After looking at all of the courses that are available at our local Barnes & Noble bookstore, we settled on the Pimsleur Basic Italian course.

I have tried other methods (for different languages) and have always had a hard with with them. I really like the Pimsleur method. It is designed to teach you to speak and understand a language. It is not intended to teach you to read and write the language. But what I like most about it is the graduated approach that it takes. Each lesson is about 30 minutes in length. You do one lesson per day. You can do the repeat the lesson on that day if you wish. Only a few new words or phrases or concepts are introduced during each lesson, so it’s not so difficult for my aging brain to grasp.