Rabu, 03 Desember 2014

Bristol Digest, Vol 579, Issue 5

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. Re: Compiling Query (Peter Hemmings)
2. Re: Compiling Query (David Smith)
3. Re: Two identical disks - system boots to the wrong one
[SOLVED] (Andrew)
4. Re: Compiling Query (John Honniball)
5. Re: Compiling Query (Peter Hemmings)
6. Re: Compiling Query (David Smith)
7. Re: Compiling Query - solved (Peter Hemmings)


----------------------------------------------------------------------

Message: 1
Date: Wed, 03 Dec 2014 12:08:35 +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
Message-ID: <547EFD43.3070307@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=windows-1252; format=flowed

On 03/12/14 10:17, Shane McEwan wrote:
> On 02/12/14 21:30, Peter Hemmings wrote:
>> 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.
>
> Is 'gcc' actually installed? What happens if you run gcc with no options?

Yep, it reports "fatal error:no input files, compilation terminated".

>
> Raspbian should have it by default but it's worth checking.

Yep

>
> If you could send the full output from the moment you run the gcc
> command to the point you get the error that would help. It might tell us
> which file it thinks is missing.

The full error was that it can't find dht11.c

As I might need to cut and paste to the list later!, I am setting up
mail client, better desktop and then trying again later today and will
post my findings.

>
> The code you're trying to compile expects the "wiringPi.h" file to be
> located in a system location (probably /usr/include or
> /usr/local/include). Perhaps that's the missing file you're talking about?

FYI I checked and in /usr/local/lib/ I have (what seems) duplicate files:

libwiringPiDev.so
libwiringPiDev.so.2.0
libwiringPi.so
libwiringPi.so.2.0
python2.7
python3.2
site_ruby

The above is a full list of the directory

Should I delete any of the above before proceeding!?

>
> Did you run the commands at the top of the "Interfacing" section of the
> blog post?

Yep

Those commands install gcc and wiringPi. If they weren't run
> or didn't work then that could be causing problems.
>
> Shane.
>
> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol
>

Will have another look later tonight

Regards
--
Peter H



------------------------------

Message: 2
Date: Wed, 3 Dec 2014 12:15:18 +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
Message-ID:
<15A9D35B5490FC49AC0524AE3A085F0874F4EA@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
> On 03/12/14 10:17, Shane McEwan wrote:
> > If you could send the full output from the moment you run the gcc
> > command to the point you get the error that would help. It might tell
> > us which file it thinks is missing.
>
> The full error was that it can't find dht11.c

That's strange. I assume it's in the current directory? If so, we're going to need:
1. The EXACT command you're running
2. The EXACT error message.
3. The output of "ls" in the directory where you run gcc

> FYI I checked and in /usr/local/lib/ I have (what seems) duplicate files:
>
> libwiringPiDev.so
> libwiringPiDev.so.2.0
> libwiringPi.so
> libwiringPi.so.2.0
> python2.7
> python3.2
> site_ruby
>
> The above is a full list of the directory
>
> Should I delete any of the above before proceeding!?

Nope. The non-version-specific ones will probably be symbolic links to the versioned ones. Also, Python 3 is significantly different to Python 2 (and not backwards-compatible), so it's common to have both versions installed to support both new and legacy scripts.



------------------------------

Message: 3
Date: Wed, 03 Dec 2014 13:44:09 +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: <547F13A9.1010509@1dtv.com>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

On 03/12/14 11:01, Amias Channer wrote:
> Helllo Andrew,
>
> your ssd might well have a boot sector that chainloads the hdd boot
> sector or no boot sector at all . your bios may also be trying to help
> and finding the only disk that has a valid boot sector.
>
> Cheers
> Amias
>
Thanks. But surely the ssd must have a valid boot sector or it would not
work on its own. Plus this was a plain vanilla install of mint on the
ssd, that was then duplicated onto the hdd.

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.lug.org.uk/mailman/private/bristol/attachments/20141203/b0ce8e72/attachment-0001.html>

------------------------------

Message: 4
Date: Wed, 03 Dec 2014 15:03:08 +0000
From: John Honniball <coredump@gifford.co.uk>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>
Subject: Re: [bristol] Compiling Query
Message-ID: <547F262C.4080805@gifford.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 03/12/2014 12:08, Peter Hemmings wrote:
> On 03/12/14 10:17, Shane McEwan wrote:
>> On 02/12/14 21:30, Peter Hemmings wrote:
>>> 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.
>>
>> Is 'gcc' actually installed? What happens if you run gcc with no options?
>
> Yep, it reports "fatal error:no input files, compilation terminated".

That's good, it's what I'd expect if GCC was installed. You can also
see gcc's version number by typing:

gcc -v


> The full error was that it can't find dht11.c

Always post the complete error message! OK, so it can't find your C
source code file. If you do an 'ls', do you see the file (presumably
not)? If you do

cat dht11.c

Do you get a bunch of C code or another "dht11.c: not found" message?

I think we need to make sure the source file really is there, and that
the name is not mis-spelled.

--
John Honniball




------------------------------

Message: 5
Date: Wed, 03 Dec 2014 16:19:47 +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
Message-ID: <547F3823.8010909@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


On 03/12/14 15:03, John Honniball wrote:
> On 03/12/2014 12:08, Peter Hemmings wrote:
>> On 03/12/14 10:17, Shane McEwan wrote:
>>> On 02/12/14 21:30, Peter Hemmings wrote:
>>>> 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.
>>>
>>> Is 'gcc' actually installed? What happens if you run gcc with no
>>> options?
>>
>> Yep, it reports "fatal error:no input files, compilation terminated".
>
> That's good, it's what I'd expect if GCC was installed. You can also
> see gcc's version number by typing:
>
> gcc -v
>
>
>> The full error was that it can't find dht11.c
>
> Always post the complete error message! OK, so it can't find your C
> source code file. If you do an 'ls', do you see the file (presumably
> not)? If you do
>
> cat dht11.c
>
> Do you get a bunch of C code or another "dht11.c: not found" message?
>
> I think we need to make sure the source file really is there, and that
> the name is not mis-spelled.
>
Patience everyone please!

I did not post full details originally because I thought it was
something very obvious I was doing wrong or not done.

I have now set up the Pi to look reasonable, got the email client
working (Icedove) and am posting from the Pi.

I will have another go and let you all know exactly what I get plus
other diagnostic O/P's - hopefully in the next hour!


Regards

--
Peter H




------------------------------

Message: 6
Date: Wed, 3 Dec 2014 16:25:21 +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
Message-ID:
<15A9D35B5490FC49AC0524AE3A085F0874F546@BRMAIL01.br.imgtec.org>
Content-Type: text/plain; charset="us-ascii"

> -----Original Message-----
> From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
> bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
>
> I did not post full details originally because I thought it was something very
> obvious I was doing wrong or not done.

It probably is, but it's not obvious from what you've posted ;-)



------------------------------

Message: 7
Date: Wed, 03 Dec 2014 16:40:44 +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 - solved
Message-ID: <547F3D0C.2080702@hemmings.eclipse.co.uk>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed


On 03/12/14 16:25, David Smith wrote:
>> -----Original Message-----
>> From: bristol-bounces@mailman.lug.org.uk [mailto:bristol-
>> bounces@mailman.lug.org.uk] On Behalf Of Peter Hemmings
>>
>> I did not post full details originally because I thought it was something very
>> obvious I was doing wrong or not done.
> It probably is, but it's not obvious from what you've posted ;-)

It was!

I can sort of blame this on the very awful resolution on my 3 x 4 inch
display I was using, but I won't.
I since put it on my 20inch monitor and when I did an "ls" I noticed
there was a space in front of the "dht11.c" file I had made!

Removed it, compiled OK and now have an executable in my Pi home directory.
(Used the original gcc command on the link)

It gives no O/P but does not complain, I assume that's fine until I
connect the sensor thats arrived today.

> _______________________________________________
> Bristol mailing list
> Bristol@mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/bristol

Regards

--
Peter H




------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 579, Issue 5
***************************************

Tidak ada komentar:

Posting Komentar