error installing octcdf-1.1.5 - octave

I Have in my Mac:
Octave-3.4.0
Gnuplot 4.2 - that I had to install because I had problems plotting - it wouldn't plot at all.
I need to load a netcdf file, the error that came was:
nc = netcdf('/users/matheuscortezi/Desktop/Pcse005/ocean_avg.nc', 'r')
error: `netcdf' undefined near line 9 column 6
So I think I don't have the netcdf comand installed, and tried installing by typing this on octave:
pkg install -global -forge octcdf
The error message that I receive from that is:
configure: error: in `/var/tmp/oct-t8XcYD/octcdf/src':
configure: error: C compiler cannot create executables
See `config.log' for more details.
the configure script returned the following error: checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... no
error: called from `pkg>configure_make' in file /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m near line 1325, column 9
error: called from:
error: /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m at line 783, column 5
error: /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/pkg/pkg.m at line 354, column 9
I haven't the faintest idea about what I should do. How can I solve this problem with either:
fixing this error, or
installing a netcdf "comand pack" (i don't know the name for that) so I can use netcdf() as in the example given.
Hope I was clear enough.

It seems to me that you installed Octave from the Mac OSX App bundle. That is not recommended at all. You should install from one of the package managers as explained on Octave's wiki. As far as I know, there are 3 options for Mac (see previous link). Just search for one that also has the netcdf package.
Anyway, if you really don't want to install it through a package manager (but seems to me you really should), seems that your problem lies on gcc (the GNU C compiler). do you have it installed at all? Some packages have code in C++ or C and are also dependent on some external libraries.
EDIT using a package manager would have also solved your problem about plotting since it would install gnuplot at same time

Related

error: tf' function belongs to the control package from Octave Forge which you have installed but not loaded

i'm doing a program in octave in which i got
t=0:.0002:20;
Gs=tf(100,[1 10])
u1=sin(t);
y1=lsim(Gs,u1,t);
plot(t,9.95*sin(t-0.1),’r’,t,y1,’b’)
However when i write Gs=tf(100,[1 10]) in the command window it appears "warning: the 'tf' function belongs to the control package from Octave Forge which
you have installed but not loaded. To load the package, run 'pkg load
control' from the Octave prompt."
How can i load this package? I trully can't understand it...
enter image description here
enter image description here
When i load it it appears:
pkg load control
warning: addpath: C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages\control-3.2.0: No such file or d
irectory
warning: called from
load_packages_and_dependencies at line 48 column 5
load_packages at line 47 column 3
pkg at line 461 column 7
t=0:.0002:20;
Gs=tf(100,[1 10])
error: could not find any INDEX file in directory C:\Octave\OCTAVE~1.0\mingw64\share\octave\packages
control-3.2.0, try 'pkg rebuild all' to generate missing INDEX files
error: called from
describe>parse_pkg_idx at line 94 column 5
describe at line 59 column 40
pkg at line 555 column 43
unimplemented>check_package at line 540 column 15
unimplemented at line 127 column 11
In the octave terminal, type
pkg load control
To load the control package. If you do not already have the control package installed, you need to install it. You can do so directly from Octave Forge by typing
pkg install -forge control
Note that this will install this package in your predefined 'prefix'. You can find where that is by typing
pkg prefix
If you're not sure if you have the control package installed, you can check the list of already installed packages by typing
pkg list
Type help pkg to see more details about how octave's package manager works.
In any case, the tf function belongs to the control package, and like all packages, you need to load it before you can use its functions.
Having said this, even after loading the control package, your above code doesn't work. It seems like you're calling the tf function using the wrong format.

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

DBD::mysql error in ActivePerl 5.28 on Windws10 64bits, Can't load mysql.dll

I'm having an issue with the DBD::mysql module. This question has been asked before on this forum but a solution was not posted so I thought I would repost it. Sorry if this is not appropriate for this forum. This is my first post.
You can find the original post from bLIGU here:
Error using perl module DBD::mysql in ActivePerl 5.28 on Windws10 64bits
I have the exact same problem. I'm just upgrading my Active Perl version. Nothing else changed. I'm running the same MySql server version and this script ran fine before the update and it runs fine if I go back to version 5.20.2.2002 and use PPM to download the packages.
Note that ActiveState now requires you to build a custom version of ActivePerl with the modules online and generates an install file for you. PPM is no longer supported.
Here's the error:
install_driver(mysql) failed: Can't load 'C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/Perl64/lib/DynaLoader.pm line 193.
at (eval 11) line 3.
Compilation failed in require at (eval 11) line 3.
Perhaps a required shared library or dll isn't installed where expected
at C:\E22_TE~1\ICTDEV~1\Scripts\UPDATE~1.PL line 136.strong text
The file C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll is present so I'm wondering if the DLL is trying to load something else and returns an error.

FirebaseCore 3.4.7 Module inside Google Drive pod corrupts workspace

I called today pod update and only FirebaseCore was updated from version 3.4.6 to 3.4.7. After that I am getting following error, no matter how many times I clean all the workspace, checkout again, etc. each time I get this new version I end up with the following errors while compiling:
duplicate symbol _GSDK_NSClassFromString in:
.../Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
...Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)
duplicate symbol _GSDK_objc_getClass in:
...Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
...Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)
duplicate symbol _GSDK_objc_getProtocol in:
...Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
...Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)
duplicate symbol _GSDK_objc_lookUpClass in:
...Pods/FirebaseCore/Frameworks/FirebaseCore.framework/FirebaseCore(overload_9ea29fd47bf44ee000bc4282b65dac06.o)
..Pods/GoogleSymbolUtilities/Frameworks/frameworks/GoogleSymbolUtilities.framework/GoogleSymbolUtilities(overload.o)
ld: 4 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solved removing -all_load from Other Linker Flags under Build Settings
I came to this question trying to integrate AdMob in a Kivy app for iOS. Removing -all_load from Other Linker Flags , as suggested by David, does allow app to compile without errors, but app will subsequently crash when Kivy instantiates your app.
The solution for my case was to use -force_load path_to_archive for each archive library in kivy-ios/dist/lib/
Hopefully this saves someone else a bit of searching!

Octave Symbolic Error- "Error in var export"

I am having a tough time with the symbolic package in octave.
Software Versions (downloaded everything today):
-Octave: 4.0.0
-OctSymPy 2.2.2
-Python: 3.4
-SymPy: 0.7.6
When I try to multiply/divide/raise to a power symbolic variables, I get the following error:
PYTHON: Error in var export
Resetting the octsympy communication mechanism
Closing the Python pipe...
error: python_cmd: unexpected return
error: called from
python_cmd at line 143 column 6
mtimes at line 42 column 5
syms X Y
X*Y
I am totally stumped. Does anyone have any ideas on the cause of this? I can add and differientiate symbolic expressions, so it is working to some extent.
Thanks!
I had the same problem and I just have downloaded and installed the python version 2.7.11 and worked fine.
Ah, don't forget to reinstall SimPy, but this time on the new Python version.
When you get back to octave, it'll recognize that version.