Go to advanced search

by swampdog
Sat Jul 20, 2019 5:59 pm
Forum: Advanced users
Topic: Problems exporting an NFS share
Replies: 3
Views: 108

Re: Problems exporting an NFS share

Have you considered iscsi for the "NFS server" pi's? Each presents a disk to the "head" pi and only NFS export from the "head". It would be a pain to attempt. The obvious caveat is the (now) "ISCSI target" (aka "NFS server") pi's would have to be guaranteed to be up and each would have to be up befo...
by swampdog
Tue Jul 16, 2019 1:32 am
Forum: C/C++
Topic: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?
Replies: 206
Views: 4859

Re: I dont get it... Why is everyone from science schools so obsessed with Perl and Python when we got C?

Fwiw, GEM from Digital Research (aka early Mac and Atari ST) GUI used pointers. Each graphical OBJECT had two pointers, "head" and "tail" which would point to the first OBJECT of the current OBJECT's child node and last OBJECT child node respectively plus a "next" pointer which would point to the ne...
by swampdog
Mon Jul 15, 2019 11:27 pm
Forum: Beginners
Topic: how to copy 1 external SD to another external SD?
Replies: 28
Views: 715

Re: how to copy 1 external SD to another external SD?

The command line will help you diagnose. $ sudo apt-get install lsscsi usbutils parted You can now "lsscsi" and "lsusb". Note I've only got one of these usb/sdcard dongles and I'm doing this under Linux Mint (no rpi to hand) but the principle is the same. What happens when you plug one in? ... $ sud...
by swampdog
Fri Jun 14, 2019 8:23 pm
Forum: General discussion
Topic: script problem (again) - scratching my head...
Replies: 9
Views: 443

Re: script problem (again) - scratching my head...

'shellcheck' does look quite useful. I'm amazed I've gone all these years without knowing of it. It can't do any harm to run it and because you can disable warnings to taste you can see the wood for the trees. In my case, SC2006, depreciated backticks rather than $(..), and it's not to know I delibe...
by swampdog
Fri Jun 07, 2019 10:39 am
Forum: C/C++
Topic: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’
Replies: 24
Views: 1578

Re: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’

@Paeryn
swampdog, dsylexia123 is compiling the code as C++, not C (the clue is in the error message :roll: )
Doh!

I did similar at work once. "What [insert flowery language] wrote this pile of [insert flowery language]?". (silence). "It was me, wasn't it?".

I've always loved The Clangers! :-)
by swampdog
Thu Jun 06, 2019 10:13 pm
Forum: C/C++
Topic: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’
Replies: 24
Views: 1578

Re: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’

The code you posted does not produce the error. I don't know what the Geany preferences are but from the (gcc 4.9.2) command line.. [email protected]:/wrk/T $ gcc -o c -Wall -pedantic a.c -lpthread -lwiringPi a.c:16:55: warning: C++ style comments are not allowed in ISO C90 int16_t strstrpos(char * haystac...
by swampdog
Thu Jun 06, 2019 9:57 pm
Forum: General discussion
Topic: script problem (again) - scratching my head...
Replies: 9
Views: 443

Re: script problem (again) - scratching my head...

@hortimech #!/bin/dash ? ;-) Shell script portability is a nightmare because you're reduced to using bourne shell (aka #!/bin/sh) and once you get complex enough to be pulling in sub scripts it becomes a royal pita. There's so many pitfalls that its either best (a) not to bother (b) install the same...
by swampdog
Thu Jun 06, 2019 2:47 pm
Forum: C/C++
Topic: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’
Replies: 24
Views: 1578

Re: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’

You're going to have to post short complete compilable code (and gcc compile options) which demonstrates the issue. We can then figure out where you're getting confused. ;-)
by swampdog
Thu Jun 06, 2019 1:20 am
Forum: General discussion
Topic: script problem (again) - scratching my head...
Replies: 9
Views: 443

Re: script problem (again) - scratching my head...

#!/bin/bash ^^^ no ! (bang) in yours. if [ -z "$2" ]; then kodiflag="$2" ^^^if nul then set nul? I tend to use the same basic template.. #!/bin/bash NAM=`basename "$0"` fcp_usage () { cat<<EOF ${NAM}: [ --help | -h ] ${NAM}: [ start | 1 ] ${NAM}: [ stop | 0 ] ${NAM}: [ foo ] [arg1] [arg2] EOF } fcp_...
by swampdog
Thu Jun 06, 2019 12:02 am
Forum: C/C++
Topic: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’
Replies: 24
Views: 1578

Re: avoid compile warnings about ISO C++ forbids converting a string constant to ‘char*’

Appearently I cannot have both ways optionally, arbitrarily, simultaneously. It's because you're inadvertently attempting to remove the "constness". Back in the bad of days of K&R compilers what you are attempting was perfectly possible and the source of maddening bugs. I could write this.. "token"...
by swampdog
Sat May 11, 2019 7:07 pm
Forum: Raspbian
Topic: tar destroys directories
Replies: 5
Views: 346

Re: tar destroys directories

oops! Realised I forgot to add something then hit [submit].(*) $sudo -i tar --no-same-owner --no-same-permissions -C / sdl-raspberrypi-3085.tar.xz ..might do the job (so long since I've used them but I suspect 'sudo -i' is important for the umask etc) but this is likely better off done via "sudo su ...
by swampdog
Sat May 11, 2019 6:41 pm
Forum: Raspbian
Topic: tar destroys directories
Replies: 5
Views: 346

Re: tar destroys directories

UNIX/Linux noob of over 30 years!!! But I'm really new to Raspbian! So how does this happen. ..because you're a very naughty veteran linux noob! $ tar --numeric-owner -tvJf /wrk/sdl-raspberrypi-3085.tar.xz |head drwx------ 126/133 0 2019-04-25 22:18 usr/ drwx------ 126/133 0 2019-04-25 22:18 usr/lo...
by swampdog
Sat May 04, 2019 12:05 pm
Forum: General discussion
Topic: Install Qt5 On Raspberry Pi2
Replies: 21
Views: 36137

Re: Install Qt5 On Raspberry Pi2

@Heater

Unfortunately no. It's proprietary. A previous employer sold my code. It ended up in the hands of a US antivirus company of which I cannot speak due to an NDA.

I haven't got round to rewriting it.
by swampdog
Sat May 04, 2019 9:01 am
Forum: C/C++
Topic: Creating a Raspberry Pi program in Qt Creator
Replies: 24
Views: 1660

Re: Creating a Raspberry Pi program in Qt Creator

Has someone got 2G of public space?

I have a debug build of QT 5.12.1. QtCreator 4.8.1.
by swampdog
Sat May 04, 2019 8:35 am
Forum: General discussion
Topic: Install Qt5 On Raspberry Pi2
Replies: 21
Views: 36137

Re: Install Qt5 On Raspberry Pi2

It's "do-able". I have QT 5.12.1 built and QtCreator 4.8.1. Works fine.
by swampdog
Tue Apr 30, 2019 9:12 pm
Forum: Beginners
Topic: Deleting 'pi' user
Replies: 8
Views: 3820

Re: Deleting 'pi' user

Fwiw, I just 'sudo passwd -l pi' (lock) the "pi" user account.
by swampdog
Wed Apr 24, 2019 5:14 pm
Forum: C/C++
Topic: GCC 6 Cross Compiler
Replies: 15
Views: 4754

Re: GCC 6 Cross Compiler

@AdamStanislav

If you can provide details of a public server, I'll upload it there.

Unfortunately for all of us, I do intend to create one/both of github/website but my time isn't my own so any new tasks have to wait.
by swampdog
Wed Apr 24, 2019 2:47 am
Forum: C/C++
Topic: GCC 6 Cross Compiler
Replies: 15
Views: 4754

Re: GCC 6 Cross Compiler

@leoPosh

Emailed. Expect three emails. "xaa" "xab" and the third (normal) one with details with subject same as this thread.
by swampdog
Sat Apr 20, 2019 8:39 pm
Forum: C/C++
Topic: Missing sharing libraries
Replies: 3
Views: 715

Re: Missing sharing libraries

$ apt-file search /opt/vc/lib/libGLESv2.so libraspberrypi0: /opt/vc/lib/libGLESv2.so $ apt-file search /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 libgles2-mesa: /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 ^^^ The files are different on my rpi. Hint for figuring it out.. sudo apt-get instal...
by swampdog
Sat Apr 20, 2019 7:55 pm
Forum: C/C++
Topic: GCC 6 Cross Compiler
Replies: 15
Views: 4754

Re: GCC 6 Cross Compiler

@leoPosh. Sure it's a 46Mb tarball. Do you have details where I can post it?
by swampdog
Fri Apr 12, 2019 2:38 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 B+ experiencing tons of kernel oops when compiling over NFS
Replies: 8
Views: 622

Re: Raspberry Pi 3 B+ experiencing tons of kernel oops when compiling over NFS

My memory may not be correct on this but I *think* I had this problem ages ago. In case it helps.. [email protected]:~ $ dfh 192.168.1.20:/mnt/nfsd/pi05 63G 45G 16G 75% / mmcblk0p1 43M 22M 21M 52% /boot mmcblk0p2 3.6G 3.1G 382M 89% /swap [email protected]:~/usr/src/gcc $ lc -h /swap/dphys -rw------- 1 root root 1...
by swampdog
Thu Apr 11, 2019 12:28 am
Forum: Beginners
Topic: [SOLVED] Trouble configuring Raspbian Lite for pubkey auth SSH with PUTTY (Windows) generated key
Replies: 9
Views: 288

Re: Trouble configuring Raspbian Lite for pubkey auth SSH with PUTTY (Windows) generated key

I've had no end of wierd problems with PuTTY over the years. If you are able you'll find it much less painful to install cygwin and its "ssh client". Just run 'ssh-user-config'. Thereafter it's just like linux. Here's how to manually set up ssh on your rpi. We'll create a throwaway account. $sudo su...
by swampdog
Wed Apr 10, 2019 11:23 pm
Forum: C/C++
Topic: std::thread not working with clang in rpi3
Replies: 3
Views: 370

Re: std::thread not working with clang in rpi3

I don't know much about clang. However, I needed to build LLVM and built clang (6.01) as most of the work was done. Mine isn't "installed" properly and thus requires LD_LIBRARY_CONFIG which *might* help with your problem. I also have multiple "gcc" versions and for this I used gcc (8.2.0) and they a...
by swampdog
Thu Apr 04, 2019 7:44 pm
Forum: Raspbian
Topic: What is the small partition visible to Windows?
Replies: 25
Views: 1249

Re: What is the small partition visible to Windows?

Are you able to give some insight into the complex reasons? Maybe i should explain what I’m trying to do. Using Raspbian (Stretch, or whatever is the current version), Volumio, or perhaps another music player oriented op system, I’m building a dedicated music player like an iPod. All this device ne...

Go to advanced search