Fuzzy-logic-toolkit install problem in Octave - octave

I am trying to install the Fuzzy-logic-toolkit package in the Octave 5.1.0 using this comand:
pkg install -forge fuzzy-logic-toolkit -verbose
and tried to sideload also by
pkg install fuzzy-logic-toolkit-0.4.5.tar.gz
but the octave always returns this code:
parse error near line 165 of file /home/leo/octave/fuzzy-logic-toolkit-0.4.5/defuzz.m
anonymous function bodies must be single expressions
>>> y_val = #(y_val) if (y_val == max_y) 1 else 0 endif;
^
error: called from
doc_cache_create>create_cache at line 109 column 20
gen_doc_cache_in_dir>#<anonymous> at line 143 column 16
doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
doc_cache_create at line 55 column 12
install>generate_lookfor_cache at line 794 column 5
install at line 223 column 7
pkg at line 441 column 9
>> warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
warning: load_path: /home/leo/octave/fuzzy-logic-toolkit-0.4.5: Arquivo ou diretório inexistente
warning: load-path: update failed for '/home/leo/octave/fuzzy-logic-toolkit-0.4.5', removing from path
Anything I can do to solve this issue? I have the same issue in version 4 (that are installed in the apt install octave of Ubuntu)

The fuzzy logic package has not been update from 2014 so the last one do not build with Octave 5.x
Two possibilities:
1) you take the latest Mercurial code and build from it
hg clone http://hg.code.sf.net/p/octave/fuzzy-logic-toolkit octave-fuzzy-logic-toolkit
cd octave-fuzzy-logic-toolkit/
hg archive ../fuzzy-logic-toolkit-0.4.5.tar.gz -X ".hg*"
cd ..
octave-cli
pkg install fuzzy-logic-toolkit-0.4.5.tar.gz
2) download the mercurial code from other source (eg Cygwin source package) and build from it
wget ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/noarch/release/octave-fuzzy-logic-toolkit/octave-fuzzy-logic-toolkit-0.4.6-0.2-src.tar.xz
tar -xf octave-fuzzy-logic-toolkit-0.4.6-0.2-src.tar.xz
octave-cli
pkg install octave-fuzzy-logic-toolkit-0.4.6-0.2.src/fuzzy-logic-toolkit-hg-0.4.6.tar.bz2

Related

unable to install any pkg in Octave

I am new to Octave, coming from Matlab. I am trying to install a few packages, and so far none has worked. I have tried the download method from forge, then running the install command. But my question is about my latest attempt. There it is:
pkg install -global -forge io
csvconcat.cc:79:37: warning: result of comparison of constant 18446744073709551615 with expression of type
'unsigned int' is always true [-Wtautological-constant-out-of-range-compare]
while ((pos=str.find(prot, pos)) != str.npos) {
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~
1 warning generated.
error: couldn't append to /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages
save: unable to open output file '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages'
error: called from
install at line 254 column 7
pkg at line 437 column 9
Couldn't find any documentation on it, I am a bit lost.... (oh and btw, I can't find the config.log file! where is that gem?)
I am on MacOS catalina 10.15.7, and just followed that procedure https://flaviocopes.com/fix-xcrun-error-invalid-active-developer-path/, which solved the issues I had before which is described on that page.
cheers for any help
The error:
error: couldn't append to /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages
save: unable to open output file '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages'
error: called from
install at line 254 column 7
pkg at line 437 column 9
basically says it's failing to save to that file. Probably a permissions issue. Check if the file /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app#4.4.1/4.4.1/share/octave/octave_packages exists and its permissions. That file is a database of all packages installed globally, i.e., for all users in the system.
Fixing the permission issues is dependent on what is the permissions issue you have (probably you need to run octave as root to install a global package). But maybe try to install the package for your user only, i.e., install the package without the -global flag, like so:
pkg install -forge io

How to recreate venv with mysql#5.5 with openssl 1.0.0 dependency on mac

I used to have a venv with mysql#5.5 installed. This somehow broke (I guess because I upgraded my python version) so I'm now trying to recreate it.
However I am getting the following error:
ImportError: dlopen(/Users/bartjonk/Envs/w-poc/lib/python3.9/site-packages/MySQLdb/_mysql.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/opt/mysql#5.5/lib/libmysqlclient.18.dylib Reason: image not found.
I don't know how to fix it.
I can't do a brew switch ore create symlinks as recommended here, since openssl version 1.0.0 is no longer in my cellar:
`> ls -al /usr/local/Cellar/op*
total 0
drwxr-xr-x 3 bartjonk staff 96 2 nov 14:42 .
drwxrwxr-x 106 bartjonk admin 3392 6 nov 17:59 ..
drwxr-xr-x 14 bartjonk staff 448 2 nov 14:42 1.1.1h`
and brew install openssl#1.0.0s or any other variants (brew install openssl#1.0 etc.) only result in :
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "openssl#1.0.2s".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
The link in the comment given by #Reinier Torenbeek (answer to: OpenSSL 1.0.2m on macOS) works like a charm.
I can now switch between the old and the new implementation using:
brew switch openssl 1.0.2m
You can check which versions are available using:
ls -al /usr/local/Cellar/op*

qemu-native error when building core-image-minimal with yocto

I want to build the core-image-minimal with yocto and it fails. To set everything up I use the following steps:
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect cmake
git clone git://git.yoctoproject.org/poky.git poky.git
cd poky.git
git checkout -b morty remotes/origin/morty
. oe-init-build-env
cd ..
git clone https://github.com/altera-opensource/meta-altera.git meta-altera
cd meta-altera
git checkout -b angstrom-v2015.12-yocto2.0 remotes/origin/angstrom-v2015.12-yocto2.0
Afterwards I add the path to meta-altera to build/conf/bblayers.conf and MACHINE = "cyclone5" to build/conf/local.conf. I would expect, that now bitbake core-image-minimal would run through, but it stops with the following error:
WARNING: qemu-native-2.7.0-r1 do_populate_sysroot: File '/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/openbios-ppc' from qemu-native was already stripped, this will prevent future debugging!
WARNING: qemu-native-2.7.0-r1 do_populate_sysroot: File '/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/openbios-sparc32' from qemu-native was already stripped, this will prevent future debugging!
WARNING: qemu-native-2.7.0-r1 do_populate_sysroot: File '/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/openbios-sparc64' from qemu-native was already stripped, this will prevent future debugging!
WARNING: qemu-native-2.7.0-r1 do_populate_sysroot: File '/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/s390-ccw.img' from qemu-native was already stripped, this will prevent future debugging!
WARNING: qemu-native-2.7.0-r1 do_populate_sysroot: File '/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/u-boot.e500' from qemu-native was already stripped, this will prevent future debugging!
ERROR: qemu-native-2.7.0-r1 do_populate_sysroot: runstrip: ''strip' --remove-section=.comment --remove-section=.note '/mydirectory/poky.git/build/tmp/work/x86_64-linux/qemu-native/2.7.0-r1/sysroot-destdir/media/sln/Data/yocto/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/palcode-clipper'' strip command failed with 1 (b"strip: Unable to recognise the format of the input file `/mydirectory/poky.git/build/tmp/work/x86_64-linux/qemu-native/2.7.0-r1/sysroot-destdir/mydirectory/poky.git/build/tmp/sysroots/x86_64-linux/usr/share/qemu/palcode-clipper'\n")
I got rid of the warnings by adding INSANE_SKIP_qemu-native = "already-stripped" to poky.git/meta/recipes-devtools/qemu/qemu.inc but the error remains. I am using Ubunut 16.04 as my build machine. Any help or tipps are appreciated.
If I continue building, I get an error while building gcc-runtime-6.2.0-r0 do_compile and it stops. I assume that this error is based on the qemu error.
Here is the build config shown in bitbake:
Build Configuration:
BB_VERSION = "1.32.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-poky-linux-gnueabi"
MACHINE = "cyclone5"
DISTRO = "poky"
DISTRO_VERSION = "2.2.1"
TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard"
TARGET_FPU = "hard"
meta
meta-poky
meta-yocto-bsp = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"
meta-altera = "angstrom-v2015.12-yocto2.0:3cfd56bb15673795435cf7684ef9c723283a6bce"
It looks like you're checking out the Yocto 2.0 branch of the meta-altera layer. Yocto 2.0 was Jethro. You're checking out the Morty branch of Poky which is Yocto 2.2. Try checking out the jethro branch of Poky with by executing the following Git command while in your poky.git folder:
git checkout -b jethro remotes/origin/jethro

Installing general package in octave has error

I have error in installing general package using the instruction.
pkg install -forge general
and get the message
octave:3> pkg install -forge general
In file included from /usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include/stdint.h:3:0,
from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/oct-conf-post.h:167,
from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/config.h:3351,
from /usr/local/octave/3.8.0/include/octave-3.8.0/octave/../octave/oct.h:31,
from SHA1.cc:19:
/usr/local/octave/3.8.0/lib/gcc47/gcc/x86_64-apple-darwin13/4.7.3/include-fixed/stdint.h:27:32: fatal error: sys/_types/_int8_t.h: No such file or directory
compilation terminated.
make: *** [SHA1.oct] Error 1
/usr/local/octave/3.8.0/bin/mkoctfile-3.8.0 SHA1.cc
pkg: error running `make' for the general package.
error: called from 'configure_make' in file /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/configure_make.m near line 82, column 9
error: called from:
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m at line 199, column 5
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/pkg.m at line 394, column 9
octave:3>
I have no idea to solve this problem. My computer OS is Mac 10.9.3 Mavericks. Octave version is 3.8.0
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
no packages installed.
Does anyone have idea?
I find the solution! Using this comment
xcode-select --install
and it's success!
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
no packages installed.
octave:2> pkg install -forge general
For information about changes from previous versions of the general package, run 'news general'.
octave:3> ver
----------------------------------------------------------------------
GNU Octave Version 3.8.0
GNU Octave License: GNU General Public License
Operating System: Darwin 13.2.0 Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
----------------------------------------------------------------------
Package Name | Version | Installation directory
--------------+---------+-----------------------
general | 1.3.4 | /Users/apple/octave/general-1.3.4
I was having the same issue when trying to install the Octave Signal Package without success. The following finally appears to be working.
code-select --install from the Terminal window to install the command line tools
Install MacPorts for Mac. This is a standard installer that you can download from Macports.
sudo port install gcc48 --> This is a Fortran compiler, which is necessary for installing octave-general
sudo port install octave-general [NOTE: THIS TOOK A VERY LONG TIME, and I had to disable Spotlight indexing...Hours on a Macbook Pro]
sudo port install octave-control
sudo port install octave-signal
While looking at how to install the control package, I found this in the Arch Wiki:
Note: Some Octave's packages, like control, need the gcc-fortran ArchLinux's package in order to compile and install.
(https://wiki.archlinux.org/index.php/Octave)
So you might have to install gcc-fortran first.

Installation error for DBD::MySQL on OSX v10.6.6

I'm attempting to get DBD::MySQL working on Snow Leopard (v10.6.6). The default version of Perl that comes with the OS is v5.10.0. Since I've read that's 64-bit, I went ahead and downloaded and installed a 64-bit version of MySQL (mysql-5.5.8-osx10.6-x86_64).
Installing and setting up MySQL went smoothly, here's my config and version number for reference.
I used CPAN to download DBI and the DBD::MySQL drivers. I then:
Installed DBI
Setup a Makefile.PL
Ran the make command from the command line
The Makefile.PL said it would use the following settings for compiling and testing:
I will use the following settings for compiling and testing:
cflags (mysql_config ) = -I/usr/local/mysql/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64
embedded (mysql_config ) =
libs (mysql_config ) = -L/usr/local/mysql/lib -lmysqlclient -lpthread
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (User's choice) = r00t!
testsocket (default ) =
testuser (User's choice) = root
To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.
Multiple copies of Driver.xst found in: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/ /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level/auto/DBI/ at Makefile.PL line 907
Using DBI 1.616 (for perl 5.010000 on darwin-thread-multi-2level) installed in /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql
Everything seemed to be going fine, until I tried to run make test :
t/00base....................NOK 2/6# Tried to use 'DBD::mysql'.
# Error: Can't load '/Users/swm/.cpan/build/DBD-mysql-4.018-Pnd2qz/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/swm/.cpan/build/DBD-mysql-4.018-Pnd2qz/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: libmysqlclient.16.dylib
# Referenced from: /Users/swm/.cpan/build/DBD-mysql-4.018-Pnd2qz/blib/arch/auto/DBD/mysql/mysql.bundle
# Reason: image not found at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 207.
# at (eval 7) line 2
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
FAILED--Further testing stopped: Unable to load DBD::mysql
make: *** [test_dynamic] Error 9
It's failing because it can't seem to find the mysql.bundle for DBD. Has anyone come across this problem? Or can point me in the right direction on what to try next? I need DBI/DBD::MySQL for my new job and I'm scrambling to find a solution.
Many thanks in advance.
I got around the "Library not loaded: libmysqlclient.16.dylib" problem by placing a symbolic link in /usr/lib/" to /usr/local/mysql-5.5.8-osx10.6-x86_64/lib/libmysqlclient.16.dylib
I worked around the same or a similar issue. Somehow I could build and test DBD::mysql with cpan but when I tried to use it in a script it said things like
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
Expected in: flat namespace
Apparently, it's a 64-bit vs 32-bit issue.
Installing the fink dbd-mysql-pm5100 package made it work though it took kind of a long time. I also removed the cpan-installed version:
sudo rm -rf /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/DBD/mysql
sudo rm -rf /Library/Perl/5.10.0/darwin-thread-multi-2level/DBD/mysql
sudo rm -rf /Library/Perl/5.10.0/darwin-thread-multi-2level/DBD/mysql.pm
also include in .profile
export VERSIONER_PERL_PREFER_32_BIT=yes;
Besides creating the link the executions of the program with DBI::mysql generated an error, thus including this variable on the environment make it works
I know this is an old post. But I suppose the best solution would be to add the library directory to the DYLD_FALLBACK_LIBRARY_PATH env variable. (reason here: https://stackoverflow.com/a/3172515/119958 )
There is no ldconfig in mac, so just add the path to this env var and rerun the install process for DBD::mysql
Donato-Vianas-MacBook-Pro:Invoicer donato$ cpanm DBD::mysql
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.022.tar.gz ... OK
Configuring DBD-mysql-4.022 ... OK
Building and testing DBD-mysql-4.022 ... FAIL
! Installing DBD::mysql failed. See /Users/donato/.cpanm/build.log for details.
# Failed test 'use DBD::mysql;'
# at t/00base.t line 21.
# Tried to use 'DBD::mysql'.
# Error: Can't load '/Users/donato/.cpanm/work/1359948144.491/DBD-mysql-4.022/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/donato/.cpanm/work/1359948144.491/DBD-mysql-4.022/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Library not loaded: libmysqlclient.18.dylib
Donato-Vianas-MacBook-Pro:Invoicer donato$ export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/mysql/lib/:$DYLD_FALLBACK_LIBRARY_PATH
Donato-Vianas-MacBook-Pro:Invoicer donato$ cpanm DBD::mysql--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.022.tar.gz ... OK
Configuring DBD-mysql-4.022 ... OK
Building and testing DBD-mysql-4.022 ... OK
Successfully installed DBD-mysql-4.022
1 distribution installed
Donato's solution works for install, but the var has to be present at runtime as well or I get the same error. The following fixes this at runtime for shell and _www user:
# For command line use, add following line to ~/.bash_profile:
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/mysql/lib/:$DYLD_FALLBACK_LIBRARY_PATH
# If Apache needs it, add following line to /etc/apache2/httpd.conf:
# On Lion Server, I put it after <IfDefine MACOSXSERVER>, but shouldn't matter
SetEnv DYLD_FALLBACK_LIBRARY_PATH /usr/local/mysql/lib/:$DYLD_FALLBACK_LIBRARY_PATH
It's somewhat of an aside, but I strongly recommend setting up a separate perl on the machine -- either by fink / macports, or from source -- and leaving the Mac's system perl (and its libraries) alone.
Once I did this on my own Mac, I had very few troubles installing modules thereafter, and I didn't have to worry about accidentally blowing a hole in my OS by breaking the perl that the system uses.
If it were my Mac, I'd install a new perl from source (the Perl source distribution is smart enough to install itself see that it's on a Mac and install itself safely into /usr/local/bin) and the proceed from thee to install DBD::Mysql (and the other modules you require).