Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk
You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."
Today's Topics:
1. Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (Peter Hemmings)
2. Re: Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (Benjamin Clarke)
3. Re: Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (Peter Hemmings)
4. Re: Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (Peter Hemmings)
5. Re: Two identical disks - system boots to the wrong one
[SOLVED] (Andrew)
6. Re: Compiling Query (was Programming Pi For Use With DHT 11
Sensor) (David Smith)
----------------------------------------------------------------------
Message: 1
Date: Tue, 02 Dec 2014 21:30:15 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: [bristol] Compiling Query (was Programming Pi For Use With
DHT 11 Sensor)
Message-ID: <547E2F67.5010507@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi,
Just a simple question.
While waiting for the sensor to arrive and still reading the info, I
thought I would get a Raspbian Pi up and running and compile the
program to see if there were any problems.
I got up to:
gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
as user in my home directory (did an ls and my dht11.c is there!), but
it complains no such file/directory.
Reference:
https://chrisbaume.wordpress.com/2013/02/10/beer-monitoring/
Something very simple I assume!?
Regards
--
Peter H
------------------------------
Message: 2
Date: Tue, 02 Dec 2014 21:52:28 +0000
From: Benjamin Clarke <benjiclarke@me.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Compiling Query (was Programming Pi For Use
With DHT 11 Sensor)
Message-ID: <E25C102B-2B99-41EF-A88C-19AD44BCAAEC@me.com>
Content-Type: text/plain; charset=windows-1252
Apologies to all if I have sent this before. I am having some issues with my email client, and the mailing list has been saying that my mail has been rejected: it is unclear to me whether this is actually the case. Think i?ve resolved it now - so I?ll give it one more try. My response:
Hi Peter,
I believe the issue may be your gcc command. When compiling with gcc you should use the following format:
gcc [flags] [targetfiles] -o [/desired/directory/output_file]
e.g.
gcc -Wall -pedantic -O3 -lm -std=c99 $FILENAME -o compiled/$COMPILEDFILE
Hope this helps.
Regards,
Benji
On 2 Dec 2014, at 21:30, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
> Hi,
>
> Just a simple question.
>
> While waiting for the sensor to arrive and still reading the info, I thought I would get a Raspbian Pi up and running and compile the
> program to see if there were any problems.
>
> I got up to:
>
> gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
>
> as user in my home directory (did an ls and my dht11.c is there!), but it complains no such file/directory.
>
> Reference:
>
> https://chrisbaume.wordpress.com/2013/02/10/beer-monitoring/
>
> Something very simple I assume!?
>
> Regards
>
> --
> Peter H
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
------------------------------
Message: 3
Date: Tue, 02 Dec 2014 23:31:56 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Compiling Query (was Programming Pi For Use
With DHT 11 Sensor)
Message-ID: <547E4BEC.5030804@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed
On 02/12/14 21:52, Benjamin Clarke wrote:
> Apologies to all if I have sent this before. I am having some issues with my email client, and the mailing list has been saying that my mail has been rejected: it is unclear to me whether this is actually the case. Think i?ve resolved it now - so I?ll give it one more try. My response:
>
> Hi Peter,
>
> I believe the issue may be your gcc command. When compiling with gcc you should use the following format:
>
> gcc [flags] [targetfiles] -o [/desired/directory/output_file]
>
> e.g.
>
> gcc -Wall -pedantic -O3 -lm -std=c99 $FILENAME -o compiled/$COMPILEDFILE
>
> Hope this helps.
It probably would to someone more experienced, but I was just checking
I could compile it using the command that others had used and said worked:
gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
I have not yet read the link given earlier on gcc but just wanted to
confirm it should work, as a user and invoking gcc from my home
directory where I had copied the code.
>
> Regards,
>
> Benji
>
>
>
> On 2 Dec 2014, at 21:30, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
>
>> Hi,
>>
>> Just a simple question.
>>
>> While waiting for the sensor to arrive and still reading the info, I thought I would get a Raspbian Pi up and running and compile the
>> program to see if there were any problems.
>>
>> I got up to:
>>
>> gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
>>
>> as user in my home directory (did an ls and my dht11.c is there!), but it complains no such file/directory.
>>
>> Reference:
>>
>> https://chrisbaume.wordpress.com/2013/02/10/beer-monitoring/
>>
>> Something very simple I assume!?
>>
>> Regards
>>
>> --
>> Peter H
>>
>> _______________________________________________
>> Bristol mailing list
>> Bristol@mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>
--
Peter H
------------------------------
Message: 4
Date: Tue, 02 Dec 2014 23:48:39 +0000
From: Peter Hemmings <peter@hemmings.eclipse.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Compiling Query (was Programming Pi For Use
With DHT 11 Sensor)
Message-ID: <547E4FD7.6050106@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed
Please ignore this request as it seems to compile on PC, Will check
tomorrow but thinks it might be to do with the code being saved as
./dht11.c. because I copied it from instructions!!
Regards
--
Peter H
------------------------------
Message: 5
Date: Tue, 02 Dec 2014 23:54:52 +0000
From: Andrew <andrewsoltau@gmail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Two identical disks - system boots to the wrong
one [SOLVED]
Message-ID: <547E514C.3050002@1dtv.com>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
On 18/11/14 23:54, Jamie Lokier wrote:
> Hi Andrew,
Hi Jamie. Thank you so much, it is all up and running.
> It's because the BIOS setting doesn't hide the drive from Linux, and
> filesystems are searched by their UUIDs. It's generally unhelpful to have
> two filesystems with the same UUID appearing to Linux.
>
> One quick thing you can do is change the filesystem UUIDs using 'tune2fs'
> (for ext2/3/4) or the appropriate filesystem tool.
>
> Then change the GRUB config file in /boot/grub/grub.cfg and /etc/fstab, for
> any mentions of the filesystem UUIDs, to the ones which match the disks
> where those files occur.
And it all worked.
> If any entries aren't using UUIDs but are, for example, /dev/sda1 (or the
> GRUB equivalent), that's not really good. You can change them to match the
> disk in your tests, but the effect will be different if a drive really fails
> or is unplugged. UUID is better, so use that.
all on uuid anyway so in luck there.
> RAID1 is generally good with two HDDs or two SSDs. It keeps everything
> synchronised and will boot if either drive fails or is removed.
>
> Though if you're unlucky with a drive not failing but "turning weird"
> (usually meaning slow) then it's not a guaranteed solution.
>
> With a HDD and SDD, RAID1 may not have the optimal performance
> characteristics that you want. You may want to explore mdadm
> --write-mostly, --write-behind, and a write-intent bitmap thay may be
> internal, or located only on the SSD.
>
> If you use RAID1 for booting, you will need to install GRUB separately on
> each disk (GRUB writes extra sectors, to just one drive at a time), and make
> sure the GRUB config includes the RAID1 module. It can be tricky to verify
> the installation really worked, so you'll need to try unplugging each drive
> to check it boots from both.
My aim is to stay away from the complexities of raid unless I have to go
there.
> A variation (which I prefer because GRUB won't get stuck if the other disk
> is semi-broken) is to install GRUB with a non-RAID boot configuration, on a
> RAID1 partition, with RAID metadata at the end of the partition so the same
> partition is accepted as a non-RAID read-only filesystem to GRUB.
Lost me there
> Best,
> -- Jamie
>
Had a bad moment as it did not work first time. I had to put the ssd on
sata0 and the hdd on sata 1. Which was obvious, which is why I started
out like that. Changed it around as part of the tryanything debug
method, and forgot to change it back. But I remain mystified as to why
the system loves the hdd so much. It boots it in preference, although
removed from the boot sequence in the bios, even once the disks have
different uuids throughout - so I assume it cannot be booting to the
ssd, and then the boot starting the hdd installation?
The hdd is sata3 while the ssd is sata2. Could that make a difference?
Does not really matter now of course. Just interested.
Cheers
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141202/da50468f/attachment-0001.html>
------------------------------
Message: 6
Date: Wed, 3 Dec 2014 09:35:53 +0000
From: David Smith <David.Smith@imgtec.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Compiling Query (was Programming Pi For Use
With DHT 11 Sensor)
Message-ID:
<15A9D35B5490FC49AC0524AE3A085F0874F484@BRMAIL01.br.imgtec.org>
Content-Type: text/plain; charset="us-ascii"
From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
> While waiting for the sensor to arrive and still reading the info, I thought I
> would get a Raspbian Pi up and running and compile the program to see if
> there were any problems.
>
> I got up to:
>
> gcc -o dht11 dht11.c -L/usr/local/lib -lwiringPi -lpthread
>
> as user in my home directory (did an ls and my dht11.c is there!), but it
> complains no such file/directory.
I suspect that the problem is in the ordering of the command line. From "gcc --help":
Usage: gcc [options] file...
So the file(s) that you want to compile should be last on the command line, after all the options.
Therefore, your command should be:
gcc -o dht11 -L/usr/local/lib -lwiringPi -lpthread dht11.c
>From what you've written, it's probably trying to look for "-L/usr/local/lib" as a file to compile, hence the "No such file or directory".
If that doesn't work, then I'm guessing that the "No such file or directory" might refer to the wiringPi and/or pthread libraries that you're trying to include. Are they installed on the Pi?
If you're still having problems, post again with the /exact/ gcc output.
------------------------------
_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol
End of Bristol Digest, Vol 579, Issue 3
***************************************
Tidak ada komentar:
Posting Komentar