Having gotten my blasted scratchbox working, I didn't seem to be any closer to compiling anything. I needed several packages and they weren't in the default packages available in the initial set up. Why, o why don't they give you any useful repositories right from the start in your scratchbox setup? I mean, COMEON!
So, the good news is that Hacking the N810 pointed me in the direction of http://gronmayer.com/it which is now officially my second savior of the day (right after Gnuton).
At Gronmayer.com I was able to search for the packages I was looking for, find out what repositories they live in and set up my /etc/apt/sources.list in the scratchbox accordingly.
Just remember, you have to set up configuration files like the /etc/apt/sources.list for EACH target you are running in scratchbox, especially if you plan to be doing cross compilation.
Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts
Tuesday, October 7, 2008
Maemo Scratchbox Hell
That was SO much harder than yesterday. So, maybe it wasn't the same problem.
When trying to install the maemo-sdk-runtime in the ARMEL target of my scratchbox, I kept getting this HUGE error that started
and ended
I'll now list ALL the things that it took to get this working...
Let us start with /etc/sysctl.conf
add the lines
to this file. I recommend doing a search for each of those setting before you add the new lines. If you have the settings in there, comment them out, and then put the changed setting directly underneath with a comment about WHY you are doing this. (That's to save you heartache later if it breaks something else.)
Next, I ran apt-get install -f in both my normal shell and in the scratchbox. I used apt-get autoremove to get rid of some no-longer-needed packages in my regular shell.
Gnuton reported several problems and fixes and although I didn't have his 'messagebus:messagebus': invalid user problem I still did
in the scratchbox, just in case.
Finally, I followed his advice and did
and finally the &$%#! fakeroot apt-get install maemo-sdk-runtime worked.
When trying to install the maemo-sdk-runtime in the ARMEL target of my scratchbox, I kept getting this HUGE error that started
[sbox-DIABLO_ARMEL: ~] > fakeroot apt-get install maemo-sdk-runtime
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
maemo-sdk-runtime
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
27 not fully installed or removed.
Need to get 0B/1890B of archives.
After unpacking 32.8kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
maemo-sdk-runtime
Install these packages without verification [y/N]? y
/scratchbox/tools/bin/sh: line 1: /usr/sbin/dpkg-preconfigure: No such file or directory
Selecting previously deselected package maemo-sdk-runtime.
(Reading database ... 16920 files and directories currently installed.)
Unpacking maemo-sdk-runtime (from .../maemo-sdk-runtime_1.0_all.deb) ...
Setting up gconf2 (2.16.0-1osso14) ...
/scratchbox/tools/bin/chown: `messagebus:messagebus': invalid user
dpkg: error processing gconf2 (--configure):
subprocess post-installation script returned error exit status 1
and ended
E: Sub-process /scratchbox/devkits/debian-etch/bin/dpkg returned an error code (1)
I'll now list ALL the things that it took to get this working...
Let us start with /etc/sysctl.conf
add the lines
vm.mmap_min_addr = 4096
net.ipv4.ip_local_port_range = 1024 65535
vm.vdso_enabled = 0
to this file. I recommend doing a search for each of those setting before you add the new lines. If you have the settings in there, comment them out, and then put the changed setting directly underneath with a comment about WHY you are doing this. (That's to save you heartache later if it breaks something else.)
Next, I ran apt-get install -f in both my normal shell and in the scratchbox. I used apt-get autoremove to get rid of some no-longer-needed packages in my regular shell.
Gnuton reported several problems and fixes and although I didn't have his 'messagebus:messagebus': invalid user problem I still did
cd /var/cache/apt/archives
fakeroot dpkg -i *dbus*
in the scratchbox, just in case.
Finally, I followed his advice and did
cp /usr/sbin/dpkg-preconfigure /scratchbox/users/lisha/targets/DIABLO_ARMEL/usr/sbin
and finally the &$%#! fakeroot apt-get install maemo-sdk-runtime worked.
Sometimes I just don't learn
I created this blog for the specific purpose of saving me from my own terrible memory. Again and again I get myself into deja vu situations where I can distinctly remember getting into this problem before, but I can't remember hoow I solved it. The number of times that has happened has dropped precipitously since I started blogging my most annoying problems here. But, despite that fact, I managed to forget how really important it is to my learning process to write these things here.
Yesterday, my maemo development scratchbox and I had a little disagreement regarding available packages and repositories. In the end, I solved the problem, but only in the i386 target. Today I cant get the armel target to work and I have no idea what the fix was yesterday. This is a serious pain.
Not to worry, I was better than the problem yesterday, and after wasting a bit more time, I shall beat it again. When I do, I'll be sure to blog the solution here.
Yesterday, my maemo development scratchbox and I had a little disagreement regarding available packages and repositories. In the end, I solved the problem, but only in the i386 target. Today I cant get the armel target to work and I have no idea what the fix was yesterday. This is a serious pain.
Not to worry, I was better than the problem yesterday, and after wasting a bit more time, I shall beat it again. When I do, I'll be sure to blog the solution here.
Wednesday, July 2, 2008
Finding a host I couldn't see
Last week I finally broke down and asked IT if they would mind if I switched over to a Linux desktop for my daily development work. Functioning in Windows was driving me absolutely bonkers. He wasn't so sure about it at first. He suggested that I run Windows and then have Linux running in virtualization. That just seemed like a waste of resources to me, though. So, I suggested that I set the computer up for dual boot, and if things went badly I could always go back to Windows.
The IT guy's concern was that, while I might be able to do my programming in Linux, I might not have access to all the company shares, the exchange server for mail, and all that other Windows-based stuff sitting on the company network. And he was right to be concerned. In the past, all those things have been a major pain in the backside to fix.
The good news is that Samba, the tool that lets you hook up Linux or Unix machines to a Windows network, has come a very long way, and the whole thing turned out to be pathetically easy. Not only that, but Evolution for mail kicks the proverbial butt, and I was able to get mail, tasks, contacts, and calendar from exchange working perfectly with the Exchange server with just a few button clicks and no sweat at all.
But, then I need to look something up on the company wiki, and that's when I hit trouble. Firefox turned my http://companywiki/ url into http://www.companywiki.com. Woops! I tried a couple of times before it sunk in to my thick skull that the problem was that my computer wasn't recognizing the internal domain names. Clearly I need another Domain Name Server in my list, but the problem is that I don't want to go back to that IT guy just now. He may just tell me it's all Linux's fault, and that I have to switch back. I don't want that. So, I have a work around.
I checked in Windows what the ip address for companywiki is supposed to be, and then, back in Linux, I edited my hosts file to point the name companywiki to that address. Poof! I have normal access to the wiki using the domain name now. Easy peasy.
There are other uses for the hosts file, too. For instance, if I have server settings in a Web application that I'm working on, I can tell my hosts file that those server names are really my computer. My computer will look where the hosts file tells it to look before asking the Domain Name Server for information, so I can test the application without having to change those server name variables in the code.
Linux is not the only system with a hosts file that can let you find servers by a certain name, either. You can find a list of where to find the hosts file on different operating systems at Wikipedia.
The IT guy's concern was that, while I might be able to do my programming in Linux, I might not have access to all the company shares, the exchange server for mail, and all that other Windows-based stuff sitting on the company network. And he was right to be concerned. In the past, all those things have been a major pain in the backside to fix.
The good news is that Samba, the tool that lets you hook up Linux or Unix machines to a Windows network, has come a very long way, and the whole thing turned out to be pathetically easy. Not only that, but Evolution for mail kicks the proverbial butt, and I was able to get mail, tasks, contacts, and calendar from exchange working perfectly with the Exchange server with just a few button clicks and no sweat at all.
But, then I need to look something up on the company wiki, and that's when I hit trouble. Firefox turned my http://companywiki/ url into http://www.companywiki.com. Woops! I tried a couple of times before it sunk in to my thick skull that the problem was that my computer wasn't recognizing the internal domain names. Clearly I need another Domain Name Server in my list, but the problem is that I don't want to go back to that IT guy just now. He may just tell me it's all Linux's fault, and that I have to switch back. I don't want that. So, I have a work around.
I checked in Windows what the ip address for companywiki is supposed to be, and then, back in Linux, I edited my hosts file to point the name companywiki to that address. Poof! I have normal access to the wiki using the domain name now. Easy peasy.
There are other uses for the hosts file, too. For instance, if I have server settings in a Web application that I'm working on, I can tell my hosts file that those server names are really my computer. My computer will look where the hosts file tells it to look before asking the Domain Name Server for information, so I can test the application without having to change those server name variables in the code.
Linux is not the only system with a hosts file that can let you find servers by a certain name, either. You can find a list of where to find the hosts file on different operating systems at Wikipedia.
Labels:
developing,
hosts,
linux,
networking,
testing,
unix,
windows
Subscribe to:
Posts (Atom)
