How to tell NetBeans where gnutls is on my system? - c

I tried to build a C/C++ project with NetBeans on my macOS Sierra, and got the following error message:
The following required libraries were not found:
gnutls
Maybe some development libraries/packages are missing?
I do have gnutls installed. How can I tell NetBeans where to look for it?

Create a symbolic link to gnutils inside /usr/local/bin, e.g.
ln -s /usr/local/Cellar/gnutls/3.5.14/bin /usr/local/bin/gnutls

Related

arm-none-eabi-gdb: " error while loading shared libraries: libncurses.so.5" - Fedora

The arm-none-eabi-* packages for Fedora 36 do not provide arm-none-eabi-gdb. So I downloaded the pre-compiled binaries for Linux directly from Arm. When I try to run arm-none-eabi-gdb, I get the following error message.
$ ./arm-none-eabi-gdb
./arm-none-eabi-gdb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Based on this answer to this related question, the solution is to install the ncurses-compat-libs package.
$ sudo dnf install ncurses-compat-libs
There are other solutions out there in the wild that suggest doing something like creating symbolic links to the newer .so files, but I think installing the compatibility library is the preferred approach.

using 'brew install avr-libc' command on Mac produces error 'no formulae found in taps'

I am running MacOS Mojave Version 10.14.1. I am attempting to install the avr embedded development environment.
The command 'brew tap osx-cross/avr' works correctly however when the command 'brew install avr-libc' is used the following error is produced error
This produces a problem as files in c cannot be compiled due to avr-gcc being unavailable.
Any help and advice would be appreciated.
as #nos said, you need to run brew install avr-gcc.
More info here: https://github.com/osx-cross/homebrew-avr#installing-homebrew-avr-formulae
This worked for me: brew tap osx-cross/avr && brew install avr-gcc
Needed to expand brew's options of available software, as well as reference the updated avr-gcc instead of avr-libc.

Can't compile pgbouncer neither in linux nor in windows

I'm trying compile pgbouncer to use in a PostgreSQL server running in windows server 2008. However I simply can't compile the dll, and the same error appears in linux (ubuntu) and in windows:
checking for libevent... configure: error: not found: cannot proceed
I'm following this howto. I've compiled the libevent in windows using mingw and copied the dlls generated to System32, SysWOW64 and even in own pgbouncer directory. What am I doing wrong?
configure is checking whether it will be possible for the package build
to link libevent. For that it needs see that libevent development
dependencies are satisfied. It checks not only that libevent itself can be found
for linkage but that the header <event.h> (exactly like that) can be
found for compilation.
For configure to succeed you must make sure that:-
event.h from your libevent package will be found in the default or
configured include-search paths of the compiler.
The libevent binary will be found in the default or configured library-search
paths of the linker.
Near the top of the HowTo that you
have referred to you will see that configure accepts a parameter
--with-libevent=libevent-prefix that can make this easy. ./configure --help
says:
--with-libevent=prefix Specify where libevent is installed
For your ubuntu system the short answer would be: install libevent-dev from
the package manager. In Ubuntu you could also install pgbouncer from
the package manager, but perhaps you want the latest version.
You need to install libevent-devel, that supplies 2 event.h files:
# find / -name event.h 2>/dev/null
/usr/include/event.h
/usr/include/event2/event.h
To install run:
yum install libevent-devel.x86_64
If you want to compile pgBouncer for Windows, follow my instructions under https://sepppenner.github.io/PgBouncerWinBinaries/ or https://github.com/SeppPenner/PgBouncerWinBinaries.

Upgraded to Mavericks, C compiler cannot create executables

Upgrading to Mavericks, I appear to have broken my Ruby on Rails development environment, which requires ruby 1.9.3 because of various gem dependencies. Within that app directory, I'm trying to reinstall ruby 1.9.3-p547:
rvm reinstall ruby-1.9.3-p547
I then get an error:
checking whether the C compiler works... no
configure: error: in `/Users/dsfaulkenberry/.rvm/src/ruby-1.9.3-p547':
configure: error: C compiler cannot create executables
Looking at the config.log file (~/.rvm/src/ruby-1.9.3-p547/config.log), I see:
dyld: Library not loaded: /usr/local/opt/cloog-ppl015/lib/libcloog.0.dylib
Referenced from: /usr/local/Cellar/gcc46/4.6.4/gcc/libexec/gcc/x86_64-apple-darwin12.4.0/4.6.4/cc1
Reason: image not found
I can see that other people have encountered issues vis-à-vis upgrading to Mavericks and having c compiler issues, but I can't find any referencing this specific library or what I should do (reinstall gcc? is that even a thing I can do?)
Many solutions mention accepting an XCode license agreement, which I have done, and the problem persists.
Reinstalling gcc46 solved the issue for me:
brew uninstall gcc46 && brew install gcc46

How to set up libusb on Mac OS X?

I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane) it said something about examples which I couldn't find anywhere on my computer.
Could anyone please describe how do I set up libusb for development on OS X? May I use Xcode? What should I include in my code?
brew install libusb-compat
Working on OSX Yosemite 10.10
Easiest way to do this:
brew install libusb
Homebrew is amazing and I recommend it for all developers that use Mac.
I tried to install the SDK from the aforementioned website and couldn't find a trace of it once the installer finished. Though I did find some libusb items at /usr/local/Developer/SDKs/MacOSX10.6.sdk/usr/local/ I'm not sure it came from that installer as I couldn't find any examples, just libraries and they were labeled as libusb0.1.4.
On the other hand, since you asked your question with the macports tag, I'd suggest you use that to install libusb as it at least puts everything in a known location:
/opt/local/var/macports/software for install files
/opt/local/lib for libraries
/opt/local/include for header files
If you've never used macports then once you have macports installed then you can install libusb using
sudo port install libusb
to install libusb1.0 or
sudo port install libusb-legacy
to install libusb0.1.12.
Then you can create a project in Xcode and link to the libusb-*.a library contained in /opt/local/lib (in my directory my library file is called libusb-1.0.a since I have libusb1.0 installed).
I don't have much experience using Xcode so I can't help you any further down this path. Personally what I've done so far is use a Python wrapper called pyusb to do some quick experimentation with libusb as I don't have to do IDE setup or library/include file setup with Python.
UPDATE: Poking around the macports install directory for libusb, I didn't find any examples included which was a bummer. If you've gotten this far then I'd suggest going directly to the source for libusb, download and unpack the tar file, and building the code that's in the example directory. Sorry for the roundabout way of getting libusb examples but I've really come to appreciate the organization macports imposes on installations which saves me quite a bit of future pain (like when I want to uninstall).
once libusb is installed using following command:
brew install libusb
or
brew install libusb-compat
link libusb to the build system using
brew link libusb
to be able to configure any project depending on libusb, use pkg-config:
pkg-config --cflags libusb-1.0
and
pkg-config --libs libusb-1.0
before calling any ./configure

Resources