Getting error while installing lme4 package in R in MacOSX Monterey - r

I am getting the following error when trying to install the lme4 package in R.
install.packages("lme4")
Installing package into ‘/usr/local/lib/R/4.2/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘minqa’
trying URL 'https://cloud.r-project.org/src/contrib/minqa_1.2.4.tar.gz'
Content type 'application/x-gzip' length 53548 bytes (52 KB)
==================================================
downloaded 52 KB
trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-29.tar.gz'
Content type 'application/x-gzip' length 3306026 bytes (3.2 MB)
==================================================
downloaded 3.2 MB
* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/usr/local/opt/gcc/bin/gfortran -fno-optimize-sibling-calls -fPIC -g -O2 -c altmov.f -o altmov.o
altmov.f:42:72:
42 | 10 HCOL(K)=ZERO
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
altmov.f:45:72:
45 | DO 20 K=1,NPT
| 1
Warning: Fortran 2018 deleted feature: Shared DO termination label 20 at (1)
altmov.f:46:72:
46 | 20 HCOL(K)=HCOL(K)+TEMP*ZMAT(K,J)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 20 at (1)
altmov.f:53:72:
53 | 30 GLAG(I)=BMAT(KNEW,I)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 30 at (1)
altmov.f:57:72:
57 | 40 TEMP=TEMP+XPT(K,J)*XOPT(J)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 40 at (1)
altmov.f:59:72:
59 | DO 50 I=1,N
| 1
Warning: Fortran 2018 deleted feature: Shared DO termination label 50 at (1)
altmov.f:60:72:
60 | 50 GLAG(I)=GLAG(I)+TEMP*XPT(K,I)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 50 at (1)
altmov.f:76:72:
76 | 60 DISTSQ=DISTSQ+TEMP*TEMP
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 60 at (1)
altmov.f:172:72:
172 | 90 XNEW(I)=DMAX1(SL(I),DMIN1(SU(I),TEMP))
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 90 at (1)
altmov.f:237:72:
237 | 140 GW=GW+GLAG(I)*W(I)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 140 at (1)
altmov.f:248:72:
248 | 150 TEMP=TEMP+XPT(K,J)*W(J)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 150 at (1)
altmov.f:249:72:
249 | 160 CURV=CURV+HCOL(K)*TEMP*TEMP
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 160 at (1)
altmov.f:255:72:
255 | 170 XALT(I)=DMAX1(SL(I),DMIN1(SU(I),TEMP))
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 170 at (1)
altmov.f:268:72:
268 | 180 W(N+I)=XALT(I)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 180 at (1)
altmov.f:275:72:
275 | 190 XALT(I)=W(N+I)
| 1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 190 at (1)
clang (LLVM option parsing): Unknown command line argument '-x86-pad-for-align=false'. Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--x86-slh-loads=false'?
make: *** [altmov.o] Error 1
ERROR: compilation failed for package ‘minqa’
* removing ‘/usr/local/lib/R/4.2/site-library/minqa’
ERROR: dependency ‘minqa’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/4.2/site-library/lme4’
The downloaded source packages are in
‘/private/var/folders/02/6dwz1gvd1qz4gml8v_wv6n980000gp/T/RtmpVREiYV/downloaded_packages’
Warning messages:
1: In install.packages("lme4") :
installation of package ‘minqa’ had non-zero exit status
2: In install.packages("lme4") :
installation of package ‘lme4’ had non-zero exit status
I recently upgraded my OS to MacOSX Monterey (12.3.1) in a MacBook 2020 (intel chip).
I have tried reinstalling gcc and gccfortran using brew with no effect.
Can anyone help me with the issue?

Removing xcode command line tools and reinstalling it solved the issue.
$ xcode-select --print-path
/Library/Developer/CommandLineTools
$ sudo rm -r -f /Library/Developer/CommandLineTools
$ xcode-select --install

Related

How should I handle m4 make error "Please port gnulib freading.c to your platform!"?

Long story short, I'm on Kali rolling 2021.3 and I'm trying to build bison and bison requires m4. I followed this and someone else had the same problem as I am. But while building m4, I'm getting:
freading.c:44:3: error: #error "Please port gnulib freading.c to your platform!"
Here's all my steps with m4 and some truncated output from making m4:
wget ftp://ftp.gnu.org/gnu/m4/m4-1.4.10.tar.gz
Untar and cd in to extracted directory:
./configure --prefix=/opt/m4
make
Then receiving this output(I added the number lines):
68 } | sed '/""/d' > configmake.h-t
69 mv configmake.h-t configmake.h
70 make all-am
71 make[2]: Entering directory '/home/kali/Downloads/m4-1.4.10/lib'
72 gcc -I. -g -O2 -MT freading.o -MD -MP -MF .deps/freading.Tpo -c -o freading.o freading.c
73 freading.c: In function ‘freading’:
74 freading.c:44:3: error: #error "Please port gnulib freading.c to your platform!"
75 44 | #error "Please port gnulib freading.c to your platform!"
76 | ^~~~~
77 make[2]: *** [Makefile:598: freading.o] Error 1
78 make[2]: Leaving directory '/home/kali/Downloads/m4-1.4.10/lib'
79 make[1]: *** [Makefile:451: all] Error 2
80 make[1]: Leaving directory '/home/kali/Downloads/m4-1.4.10/lib'
81 make: *** [Makefile:421: all-recursive] Error 1
Does anyone know how I should handle this kind of error, especially around m4?

Compiling PyQt5 App with QtWebEngine

I've been trying to compile an app that uses the QtWebEngine from PyQt5. The app works as intended but it fails when compiling. I've spent a couple of days looking for solution but so far I had no luck. I've installed python from both brew and downloading the package form it's website. I've also installed PyQt5 form brew and pip3 without any luck. After running the pyinstaller script I get the "cannot find QtWebEngineProcess" error. That's fixed by copying the QtWebEngineProcess.app file into the MacOS folder. Subsequentially I made sure that the info.plist file is not a symlink but the actual file. Afterwards I added the "org.qt-project.Qt.QtWebEngineCore" flag to the "CFBundleIdentifier" in the main app info.plist. This resolves the problem of not finding "QtWebEngineProcess" but it brings now the error stated below. I copied the "icudtl.dat" to the MacOS folder as well. I also tried rebuilding the dependencies with the framework itself and making sure I don't have symlinks like stated here. I'm not familiar with the install_name_tool so I'm stuck there. Any ideas? Is anyone able to compile a pyqt app using QtWebEngine at all?
Here's the error I'm facing:
[0201/130544:ERROR:icu_util.cc(162)] Invalid file descriptor to ICU data received.
[0201/130544:FATAL:content_main_runner.cc(714)] Check failed: base::i18n::InitializeICU().
0 QtWebEngineCore 0x000000010d4b62e3 _ZN15QtWebEngineCore20FilePickerController11qt_metacallEN11QMetaObject4CallEiPPv + 12132083
1 QtWebEngineCore 0x000000010d4c9809 _ZN15QtWebEngineCore20FilePickerController11qt_metacallEN11QMetaObject4CallEiPPv + 12211225
2 QtWebEngineCore 0x000000010ce7cb03 _ZN15QtWebEngineCore20FilePickerController11qt_metacallEN11QMetaObject4CallEiPPv + 5605139
3 QtWebEngineCore 0x000000010c918ee4 _ZN15QtWebEngineCore18WebContentsAdapter14faviconManagerEv + 28052
4 QtWebEngineCore 0x000000010c917f48 _ZN15QtWebEngineCore18WebContentsAdapter14faviconManagerEv + 24056
5 QtWebEngineCore 0x000000010c90e3b9 _ZN15QtWebEngineCore18WebContentsAdapterC2EPN7content11WebContentsE + 57
6 QtWebEngineWidgets 0x000000011113ce4e _ZrsR11QDataStreamR17QWebEngineHistory + 1870
7 QtWebEngineWidgets 0x000000011113ec20 _ZN14QWebEnginePageC1EP7QObject + 48
8 QtWebEngineWidgets 0x000000011114ad17 _ZN14QWebEngineView6setUrlERK4QUrl + 55
9 PyQt5.QtWebEngineWidgets.so 0x0000000111100ca3 _ZL26meth_QWebEngineView_setUrlP7_objectS0_ + 99
10 Python 0x00000001080faae9 PyCFunction_Call + 233
11 Python 0x0000000108187a81 PyEval_EvalFrameEx + 35729
12 Python 0x00000001081884fc PyEval_EvalFrameEx + 38412
13 Python 0x0000000108188e90 _PyEval_EvalCodeWithName + 2400
14 Python 0x0000000108188f97 PyEval_EvalCodeEx + 71
15 Python 0x00000001080d577a function_call + 186
16 Python 0x00000001080a28d3 PyObject_Call + 99
17 Python 0x00000001080bd9cc method_call + 140
18 Python 0x00000001080a28d3 PyObject_Call + 99
19 Python 0x00000001081184c1 slot_tp_init + 81
20 Python 0x000000010810ef44 type_call + 212
21 Python 0x00000001080a28d3 PyObject_Call + 99
22 Python 0x0000000108182b65 PyEval_EvalFrameEx + 15477
23 Python 0x0000000108188e90 _PyEval_EvalCodeWithName + 2400
24 Python
0x0000000108188ff1 PyEval_EvalCode + 81
25 Sailor 0x0000000106e52490 Sailor + 9360
26 Sailor 0x0000000106e529f9 Sailor + 10745
27 Sailor 0x0000000106e51464 Sailor + 5220
28 ??? 0x0000000000000003 0x0 + 3
Trace/BPT trap: 5
It worked for me after using this branch and adding some custom patching:
def patch_osx_app():
"""Patch .app to copy missing data and link some libs.
See https://github.com/pyinstaller/pyinstaller/issues/2276
"""
app_path = os.path.join('dist', 'qutebrowser.app')
qtwe_core_dir = os.path.join('.tox', 'pyinstaller', 'lib', 'python3.6',
'site-packages', 'PyQt5', 'Qt', 'lib',
'QtWebengineCore.framework')
# Copy QtWebEngineProcess.app
proc_app = 'QtWebEngineProcess.app'
shutil.copytree(os.path.join(qtwe_core_dir, 'Helpers', proc_app),
os.path.join(app_path, 'Contents', 'MacOS', proc_app))
# Copy resources
for f in glob.glob(os.path.join(qtwe_core_dir, 'Resources', '*')):
dest = os.path.join(app_path, 'Contents', 'Resources')
if os.path.isdir(f):
shutil.copytree(f, os.path.join(dest, f))
else:
shutil.copy(f, dest)
# Link dependencies
for lib in ['QtCore', 'QtWebEngineCore', 'QtQuick', 'QtQml', 'QtNetwork',
'QtGui', 'QtWebChannel', 'QtPositioning']:
dest = os.path.join(app_path, lib + '.framework', 'Versions', '5')
os.makedirs(dest)
os.symlink(os.path.join(os.pardir, os.pardir, os.pardir, 'Contents',
'MacOS', lib),
os.path.join(dest, lib))
It`s some problem with the QtWebEngine. I believed that exists patch to fix this bug.
You can see other informations in https://github.com/pyinstaller/pyinstaller/issues/2566
The files:
icudtl.dat
qtwebengine_devtools_resources.pak
qtwebengine_resources.pak
qtwebengine_resources_100p.pak
qtwebengine_resources_200p.pak
need to be in .app/Contents/Resources

%R magic no longer works in IPython or Jupyter following update to Canopy Ver 1.7.4.3348

Previously %R and %%R magics were working in IPython and Jupyter python notebooks.
The R terminal version is:
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.4.0 (64-bit)
After upgrading to Version 1.7.4.3348 in Enthought Canopy, the notebooks and IPython no longer work. I have tried reinstalling following Installing RKernel and http://irkernel.github.io/installation/, which worked before. I run the command to load the R-extension as per
%load_ext rpy2.ipython
I get the error message as follows:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-691c6d73b073> in <module>()
----> 1 get_ipython().magic(u'load_ext rpy2.ipython')
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2161 magic_name, _, magic_arg_s = arg_s.partition(' ')
2162 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2163 return self.run_line_magic(magic_name, magic_arg_s)
2164
2165 #-------------------------------------------------------------------------
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2082 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2083 with self.builtin_trap:
-> 2084 result = fn(*args,**kwargs)
2085 return result
2086
<decorator-gen-64> in load_ext(self, module_str)
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/magics/extension.pyc in load_ext(self, module_str)
64 if not module_str:
65 raise UsageError('Missing module name.')
---> 66 res = self.shell.extension_manager.load_extension(module_str)
67
68 if res == 'already loaded':
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self, module_str)
82 if module_str not in sys.modules:
83 with prepended_to_syspath(self.ipython_extension_dir):
---> 84 __import__(module_str)
85 mod = sys.modules[module_str]
86 if self._call_load_ipython_extension(mod):
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/__init__.py in <module>()
----> 1 from .rmagic import load_ipython_extension
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/ipython/rmagic.py in <module>()
57 template_converter = ro.conversion.converter
58 try:
---> 59 from rpy2.robjects import pandas2ri as baseconversion
60 template_converter = template_converter + baseconversion.converter
61 except ImportError:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/rpy2/robjects/pandas2ri.py in <module>()
7 INTSXP)
8
----> 9 from pandas.core.frame import DataFrame as PandasDataFrame
10 from pandas.core.series import Series as PandasSeries
11 from pandas.core.index import Index as PandasIndex
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py in <module>()
20
21 # numpy compat
---> 22 from pandas.compat.numpy_compat import *
23
24 try:
/Users/Llewelyn_home/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/compat/numpy_compat.py in <module>()
13
14 # numpy versioning
---> 15 _np_version = np.version.short_version
16 _np_version_under1p8 = LooseVersion(_np_version) < '1.8'
17 _np_version_under1p9 = LooseVersion(_np_version) < '1.9'
AttributeError: 'module' object has no attribute 'version'
Could it be related to Canopy version of numpy being listed as 1.10.4-1 and the np.version result being 1.11.1 (based on error message)? Any suggestions gratefully received. PS. R works in the console still, plus in terminal and in Jupyter with an R kernel...
The support crew at Enthought examined the version of numpy, then pandas. Reinstalling both did not solve the problem. The unexplained resolution occurred from the pip install theano --upgrade command on the Canopy Terminal. Logging this error as an unexplained issue with %R but with the strong indication that it is about dependency version.

yosys fails at ABC pass (on counter.v demo)

I hope someone can help me with this...
This is my first encounter with yosys. For the start, I'm trying to run the very same demo as Clifford explained in his presentation. I downloaded the demo at the following location: https://github.com/cliffordwolf/yosys/tree/master/manual/PRESENTATION_Intro
yosys run beaks at the ABC pass with following message:
12. Executing ABC pass (technology mapping using ABC).
12.1. Extracting gate netlist of module `\counter' to `<abc-temp-dir>/input.blif'..
Extracted 6 gates and 12 wires to a netlist network with 4 inputs and 2 outputs.
12.1.1. Executing ABC.
Running ABC command: <yosys-exe-dir>/yosys-abc -s -f <abc-temp-dir>/abc.script 2>&1
ABC: ABC command line: "source <abc-temp-dir>/abc.script".
ABC:
ABC: + read_blif <abc-temp-dir>/input.blif
ABC: + read_lib -w /home/boris/Documents/Self Learning/yosys_synthesys/mycells.lib
ABC: usage: read_lib [-SG float] [-M num] [-dnvwh] <file>
ABC: reads Liberty library from file
ABC: -S float : the slew parameter used to generate the library [default = 0.00]
ABC: -G float : the gain parameter used to generate the library [default = 0.00]
ABC: -M num : skip gate classes whose size is less than this [default = 0]
ABC: -d : toggle dumping the parsed library into file "*_temp.lib" [default = no]
ABC: -n : toggle replacing gate/pin names by short strings [default = no]
ABC: -v : toggle writing verbose information [default = yes]
ABC: -v : toggle writing information about skipped gates [default = yes]
ABC: -h : prints the command summary
ABC: <file> : the name of a file to read
ABC: ** cmd error: aborting 'source <abc-temp-dir>/abc.script'
ERROR: Can't open ABC output file `/tmp/yosys-abc-KDGya6/output.blif'.
[boris#E7440 yosys_synthesys]$
I have had a look at the file location mentioned in the error statement above, there is no output.blif in there:
[boris#E7440 yosys_synthesys]$ ll /tmp/yosys-abc-KDGya6/
total 12K
-rw-rw-r--. 1 boris boris 542 Jul 5 11:21 abc.script
-rw-rw-r--. 1 boris boris 526 Jul 5 11:21 input.blif
-rw-rw-r--. 1 boris boris 852 Jul 5 11:21 stdcells.genlib
[boris#E7440 yosys_synthesys]$
Buy the way, here is some system/tools info that might be relevant for debugging:
Linux E7440.DELL 4.4.13-200.fc22.x86_64 #1 SMP Wed Jun 8 15:59:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Yosys 0.6+141 (git sha1 080f95f, gcc 5.3.1 -fPIC -Os)
UC Berkeley, ABC 1.01 (compiled Mar 8 2015 01:00:49)
The issue has been resolved...
Solution =
Changed rundir from:
/home/boris/Documents/Self Learning/yosys_synthesys/mycells.lib
to:
/home/boris/Documents/SelfLearning/yosys_synthesys/mycells.lib
Lesson learned =
ABC tool does not accept space characters in the path/file name.

Caused a HMError when running HTKDemo

I just installed HTS-2.2 and HTK-3.4.1 in my 64bit Ubuntu with gcc 3.4 compiler. After that, typing HInit and HCopy etc. seemed work. So I wondered how the HTKDemo works.
When I run the demo, HTK caused a problem:
HMM Def Error: <Mean> symbol expected in GetMean at line 6/col 11/char 120 in proto/L
ERROR [+7050] HMError:
HMM Def Error: GetMean Failed at line 6/col 12/char 121 in proto/L
ERROR [+7050] HMError:
HMM Def Error: Regression Class Number expected at line 7/col 0/char 122 in proto/L
ERROR [+7050] HMError:
HMM Def Error: GetMixtures failed at line 7/col 1/char 123 in proto/L
ERROR [+7050] HMError:
HMM Def Error: Get Stream Information failed at line 7/col 2/char 124 in proto/L
ERROR [+7050] HMError:
HMM Def Error: GetStream failed at line 7/col 3/char 125 in proto/L
ERROR [+7050] HMError:
HMM Def Error: GetStateInfo failed at line 7/col 4/char 126 in proto/L
ERROR [+7050] HMError:
ERROR [+7032] LoadHMMSet: GetHMMDef failed
ERROR [+2128] Initialise: LoadHMMSet failed
FATAL ERROR - Terminating program HInit
Source Directory Empty hmms/hmm.0
The same to the proto S, V, N, C.
I really want to know the reason and how to fix it? Thx!
I got the same +7050 error, in my case was a mispelled hmm definition file, probably you have the same problem since the error reported: " symbol expected".
Just check your definition file had the right format as follows:
~h (phoneme name)
<BEGINHMM>
<NUMSTATES> (NStates)
<STATE> 2 (number starting from 2, ending NStates-1 )
<MEAN> 13 (or any number defined)
-4.717658e+000 ...
<VARIANCE> 13 (the same as mean possibly)
4.735534e+001 ...
<STATE> 3 ....
...
<GCONST> 1.269744e+002
<TRANSP> 3 (again not important)
0.0 1.0 0.0
0.0 0.9 0.1
0.0 0.0 0.0
<ENDHMM>
~h (next phoneme )
...

Resources