using clang compile ffmpeg with too much warning on osx - ios

I use clang to compile ffmpeg, It reports too much warn
./libavutil/arm/intmath.h:102:40: warning: value size does not match register size specified by the constraint and modifier
[-Wasm-operand-widths]
./libavutil/arm/intmath.h:102:40: warning: value size does not match register size specified by the constraint and modifier
[-Wasm-operand-widths]
and finally stop with error
libavcodec/arm/mlpdsp_armv5te.S:5180:9: error: unknown directive
.hword (75f - 0b) / 2
^
libavcodec/arm/mlpdsp_armv5te.S:5182:9: error: unknown directive
.hword (76f - 0b) / 2
^
libavcodec/arm/mlpdsp_armv5te.S:5184:9: error: unknown directive
.hword (77f - 0b) / 2
^
libavcodec/arm/mlpdsp_armv5te.S:5186:9: error: unknown directive
.hword (78f - 0b) / 2
^
libavcodec/arm/mlpdsp_armv5te.S:5648:9: error: unknown directive
Is there anyone met the same problem?

Related

gem not installing unde Monterey OS X

A rails application created with Ruby 3.1.0 and rails 7.0.3 on a Mac OS X 10.13.6 bundles all required gems using Bundler version 2.3.3
When migrating the application to Mac OS X 12.3 (monterey) with the same bundler version,
this is encountered:
An error occurred while installing semacode-ruby19 (0.7.4), and Bundler cannot continue.
Commenting out the gem allows the gem intallation procedure to complete. However the application remains incomplete, test/test_helper.rb for example needs to be commented out as the application tests the generation of Barby::DataMatrix.new(...)
The aforementioned gem has not been updated in a long time (thus no expectations should be entertained) - however the functionality of encoding DataMatrix for ruby remains a going concern. What options are open at this point?
I remain uncertain as to the source of the problem - the ∆s are OS X and homebrew - and thus uncertain as to where to report this. Suggestions welcome.
Update
As per the suggestion, the manual installation of the gem also fails:
gem install semacode -v 0.7.4 -- --with-cflags="-Wno-error=implicit-function-declaration"
Fetching semacode-0.7.4.gem
Building native extensions with: '--with-cflags=-Wno-error=implicit-function-declaration'
This could take a while...
ERROR: Error installing semacode:
ERROR: Failed to build gem native extension.
current directory: /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/semacode-0.7.4/ext
/Users/deploy/.rbenv/versions/3.1.0/bin/ruby -I /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/3.1.0 -r ./siteconf20220830-40292-dndt8s.rb extconf.rb --with-cflags\=-Wno-error\=implicit-function-declaration
creating Makefile
current directory: /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/semacode-0.7.4/ext
make DESTDIR\= clean
current directory: /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/semacode-0.7.4/ext
make DESTDIR\=
compiling iec16022ecc200.c
iec16022ecc200.c:284:80: warning: data argument not used by format string [-Wformat-extra-args]
rb_raise(rb_eArgError, "cannot encode character in X12", c);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
iec16022ecc200.c:299:80: warning: data argument not used by format string [-Wformat-extra-args]
rb_raise(rb_eArgError, "cannot encode character in X12", c);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
iec16022ecc200.c:323:89: warning: data argument not used by format string [-Wformat-extra-args]
rb_raise(rb_eRuntimeError, "this should not be happening!", c);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
iec16022ecc200.c:498:9: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'void *' [-Wint-conversion]
VALUE rb_str = NULL;
^ ~~~~
iec16022ecc200.c:908:12: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
grid = ALLOC_N(char, W * H);
^ ~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
compiling reedsol.c
compiling semacode.c
semacode.c:61:3: warning: implicit declaration of function 'iec16022init' is invalid in C99 [-Wimplicit-function-declaration]
iec16022init(&semacode->width, &semacode->height, message);
^
semacode.c:96:28: warning: 'bzero' call operates on objects of type 'semacode_t' (aka 'struct semacode_t') while the size is based on a different type 'semacode_t *' (aka 'struct semacode_t *') [-Wsizeof-pointer-memaccess]
bzero(semacode, sizeof(semacode));
~~~~~~~~ ^~~~~~~~
semacode.c:96:28: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)?
bzero(semacode, sizeof(semacode));
^~~~~~~~
semacode.c:129:27: error: no member named 'len' in 'struct RString'
encode_string(semacode, StringValueLen(message), StringValuePtr(message));
^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:56: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
semacode.c:239:20: warning: equality comparison result unused [-Wunused-comparison]
semacode->data == NULL;
~~~~~~~~~~~~~~~^~~~~~~
semacode.c:239:20: note: use '=' to turn this equality comparison into an assignment
semacode->data == NULL;
^~
=
semacode.c:243:44: error: no member named 'len' in 'struct RString'
DATA_PTR(self) = encode_string(semacode, StringValueLen(message), StringValuePtr(message));
^~~~~~~~~~~~~~~~~~~~~~~
./semacode.h:26:56: note: expanded from macro 'StringValueLen'
#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
3 warnings and 2 errors generated.
make: *** [semacode.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/semacode-0.7.4 for inspection.
Results logged to /Users/deploy/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/arm64-darwin-21/3.1.0/semacode-0.7.4/gem_make.out

OpenCV 3.4.4 make error with mingw32-make "persistence.cpp"

I am currently installing OpenCV3.4.4 in ordre to use it with Code::Blocks. I used CMake GUI to Configure and Generates the binaries.
But when I'm using 'mingw32-make' to finish the installation, an error occurs about strnlen which apparently is not define. I have the following message :
"
C:\opencv\sources\modules\core\src\persistence.cpp: In function 'char* icvGets(CvFileStorage*, char*, int)':
C:\opencv\sources\modules\core\src\persistence.cpp:71:46: error: 'strnlen' was not declared in this scope
size_t sz = strnlen(ptr, maxCount);
^
C:\opencv\sources\modules\core\src\persistence.cpp:82:46: error: 'strnlen' was not declared in this scope
size_t sz = strnlen(ptr, maxCount);
^
modules\core\CMakeFiles\opencv_core.dir\build.make:901: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.obj' failed
mingw32-make[2]: * [modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.obj] Error 1
CMakeFiles\Makefile2:1671: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
mingw32-make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:161: recipe for target 'all' failed
mingw32-make: *** [all] Error 2"
"
I've read some other forum asking to change some variables in CMake GUI but for other issues and I did not succeed to find the same as me. I hope that someone could help me. thank you
If this is useful for you, I was able to compile OpenCV 3.1.0 with MinGW32.
I have not been able to compile OpenCV3.4.7 with MinGW32 (I think that this backward compatibility has been abandoned), but I succeeded to compile OpenCV3.4.7 with MinGW64.

Caffe build fail: Makefile:591: recipe for target '.build_release/src/caffe/util/io.o' failed

Hello I' ve got issue on caffe installation. I did everything in accordance to the instruction https://github.com/BVLC/caffe/wiki/Ubuntu-16.04-Installation-Guide (for CPU version)
On command make all I've got the following output:
CXX src/caffe/util/io.cpp
In file included from /usr/local/include/opencv2/core.hpp:52:0,
from /usr/local/include/opencv2/core/core.hpp:48,
from src/caffe/util/io.cpp:6:
/usr/local/include/opencv2/core/cvdef.h:421:4: error: #error "OpenCV 4.x+ requires enabled C++11 support"
# error "OpenCV 4.x+ requires enabled C++11 support"
^
In file included from /usr/include/c++/5/array:35:0,
from /usr/local/include/opencv2/core/cvdef.h:426,
from /usr/local/include/opencv2/core.hpp:52,
from /usr/local/include/opencv2/core/core.hpp:48,
from src/caffe/util/io.cpp:6:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^
In file included from /usr/local/include/opencv2/core/base.hpp:58:0,
from /usr/local/include/opencv2/core.hpp:54,
from /usr/local/include/opencv2/core/core.hpp:48,
from src/caffe/util/io.cpp:6:
/usr/local/include/opencv2/core/cvstd.hpp:389:12: error: expected ‘,’ or ‘...’ before ‘&&’ token
Ptr(Ptr&& o);
^
/usr/local/include/opencv2/core/cvstd.hpp:389:16: error: invalid constructor; you probably meant ‘cv::Ptr<T> (const cv::Ptr<T>&)’
Ptr(Ptr&& o);
^
/usr/local/include/opencv2/core/cvstd.hpp:390:25: error: expected ‘,’ or ‘...’ before ‘&&’ token
Ptr& operator = (Ptr&& o);
^
In file included from /usr/local/include/opencv2/core/cvstd.hpp:1033:0,
from /usr/local/include/opencv2/core/base.hpp:58,
from /usr/local/include/opencv2/core.hpp:54,
from /usr/local/include/opencv2/core/core.hpp:48,
from src/caffe/util/io.cpp:6:
/usr/local/include/opencv2/core/ptr.inl.hpp:256:16: error: expected ‘,’ or ‘...’ before ‘&&’ token
Ptr<T>::Ptr(Ptr&& o) : owner(o.owner), stored(o.stored)
^
/usr/local/include/opencv2/core/ptr.inl.hpp:256:1: error: prototype for ‘cv::Ptr<T>::Ptr(cv::Ptr<T>)’ does not match any in class ‘cv::Ptr<T>’
Ptr<T>::Ptr(Ptr&& o) : owner(o.owner), stored(o.stored)
^
In file included from /usr/local/include/opencv2/core/base.hpp:58:0,
from /usr/local/include/opencv2/core.hpp:54,
from /usr/local/include/opencv2/core/core.hpp:48,
from src/caffe/util/io.cpp:6:
/usr/local/include/opencv2/core/cvstd.hpp:319:5: error: candidates are: template<class T> template<class Y> cv::Ptr<T>::Ptr(const cv::Ptr<Y>&, T*)
Ptr(const Ptr<Y>& o, T* p);
Here is also a lot of text in output but I cannot upload it because of limit on number of characters
Makefile:591: recipe for target '.build_release/src/caffe/util/io.o' failed
make: *** [.build_release/src/caffe/util/io.o] Error 1
Can somebody help me with this problem?
OS: Ubuntu 16.04
cmake version 3.5.1
Cuda version: 10.0.130
The problem was in 4th version of OpenCV. Caffe dosen't work with it. When I installed 3rd version everything was ok.

Error trying to install rinku gem on mac

I'm having trouble installing the rinku gem version '1.7.3' on Mavericks. I followed the advice of another post that suggested to install apple-gcc42 but that didn't help. I've also tried searching google and stack overflow but couldn't find this exact issue. Here is the error:
Building native extensions. This could take a while...
ERROR: Error installing rinku:
ERROR: Failed to build gem native extension.
/Users/home/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
creating Makefile
make clean
make
compiling autolink.c
In file included from autolink.c:17:
buffer.h:23:20: error: stdint.h: No such file or directory
In file included from autolink.c:17:
buffer.h:41: error: expected specifier-qualifier-list before 'uint8_t'
In file included from autolink.c:18:
autolink.h:31: warning: type defaults to 'int' in declaration of 'uint8_t'
autolink.h:31: error: expected ';', ',' or ')' before '*' token
autolink.h:35: error: expected declaration specifiers or '...' before 'uint8_t'
autolink.h:39: error: expected declaration specifiers or '...' before 'uint8_t'
autolink.h:43: error: expected declaration specifiers or '...' before 'uint8_t'
autolink.c:20:20: error: string.h: No such file or directory
autolink.c:21:20: error: stdlib.h: No such file or directory
autolink.c:22:19: error: stdio.h: No such file or directory
autolink.c:23:19: error: ctype.h: No such file or directory
autolink.c:30: warning: type defaults to 'int' in declaration of 'uint8_t'
... Had to leave out some of the error because it won't let me post this without a lower code to text ratio.
autolink.c: At top level:
autolink.c:256: error: expected declaration specifiers or '...' before 'uint8_t'
autolink.c: In function 'sd_autolink__url':
autolink.c:263: error: 'data' undeclared (first use in this function)
autolink.c:266: warning: implicit declaration of function 'isalpha'
autolink.c:269: warning: implicit declaration of function 'sd_autolink_issafe'
autolink.c:272: warning: incompatible implicit declaration of built-in function 'strlen'
make: *** [autolink.o] Error 1
make failed, exit code 2
this ended up fixing it for 1.9.3
xcode-select --install

using PETSc in gfortran, but it didn't compile

I want to test and use PESTc in fortran, so I wrote something very simple and null like (petscexe.F):
PROGRAM petscexe
INCLUDE 'petscsys.h'
END PROGRAM petscexe
to see if the header file can be correctly imported.
I compile the file with gfortran:
gfortran petscexe.F -I /opt/local/lib/petsc/include/finclude
the header file is located in this folder (/opt/local/lib/petsc/include/finclude) in my computer. So everything should be fine, but...
The error is
Warning: petscsys.h:5: Illegal preprocessor directive
Warning: petscsys.h:6: Illegal preprocessor directive
Warning: petscsys.h:7: Illegal preprocessor directive
Warning: petscsys.h:9: Illegal preprocessor directive
Warning: petscsys.h:10: Illegal preprocessor directive
Warning: petscsys.h:11: Illegal preprocessor directive
Warning: petscsys.h:20: Illegal preprocessor directive
Warning: petscsys.h:22: Illegal preprocessor directive
Warning: petscsys.h:24: Illegal preprocessor directive
Warning: petscsys.h:87: Illegal preprocessor directive
Warning: petscsys.h:88: Illegal preprocessor directive
Warning: petscsys.h:89: Illegal preprocessor directive
Warning: petscsys.h:90: Illegal preprocessor directive
Warning: petscsys.h:91: Illegal preprocessor directive
Warning: petscsys.h:92: Illegal preprocessor directive
Warning: petscsys.h:93: Illegal preprocessor directive
Warning: petscsys.h:94: Illegal preprocessor directive
Warning: petscsys.h:119: Illegal preprocessor directive
Warning: petscsys.h:121: Illegal preprocessor directive
Warning: petscsys.h:123: Illegal preprocessor directive
Warning: petscsys.h:139: Illegal preprocessor directive
Warning: petscsys.h:143: Illegal preprocessor directive
Warning: petscsys.h:147: Illegal preprocessor directive
Warning: petscsys.h:153: Illegal preprocessor directive
Warning: petscsys.h:154: Illegal preprocessor directive
Warning: petscsys.h:156: Illegal preprocessor directive
Warning: petscsys.h:158: Illegal preprocessor directive
Warning: petscsys.h:159: Illegal preprocessor directive
Warning: petscsys.h:160: Illegal preprocessor directive
Warning: petscsys.h:162: Illegal preprocessor directive
Warning: petscsys.h:164: Illegal preprocessor directive
Warning: petscsys.h:165: Illegal preprocessor directive
Warning: petscsys.h:168: Illegal preprocessor directive
Warning: petscsys.h:170: Illegal preprocessor directive
Warning: petscsys.h:172: Illegal preprocessor directive
Warning: petscsys.h:234: Illegal preprocessor directive
Warning: petscsys.h:235: Illegal preprocessor directive
Warning: petscsys.h:236: Illegal preprocessor directive
Warning: petscsys.h:252: Illegal preprocessor directive
Warning: petscsys.h:254: Illegal preprocessor directive
Warning: petscsys.h:256: Illegal preprocessor directive
petscsys.h:18.6:
Included at petscexe.F:2:
PetscBool PETSC_TRUE
1
Error: Unclassifiable statement at (1)
petscsys.h:19.6:
Included at petscexe.F:2:
PetscBool PETSC_FALSE
1
Error: Unclassifiable statement at (1)
petscsys.h:23.29:
Included at petscexe.F:2:
parameter (PETSC_TRUE = .true.,PETSC_FALSE = .false.)
1
Error: Can't convert LOGICAL(4) to REAL(4) at (1)
petscsys.h:25.6:
Included at petscexe.F:2:
PetscInt PETSC_DECIDE,PETSC_DETERMINE
1
Error: Unclassifiable statement at (1)
petscsys.h:28.6:
Included at petscexe.F:2:
PetscInt PETSC_DEFAULT_INTEGER
1
Error: Unclassifiable statement at (1)
petscsys.h:31.6:
Included at petscexe.F:2:
PetscFortranDouble PETSC_DEFAULT_DOUBLE_PRECISION
1
Error: Unclassifiable statement at (1)
petscsys.h:34.6:
Included at petscexe.F:2:
PetscEnum PETSC_FP_TRAP_OFF
1
Error: Unclassifiable statement at (1)
petscsys.h:35.6:
Included at petscexe.F:2:
PetscEnum PETSC_FP_TRAP_ON
1
Error: Unclassifiable statement at (1)
petscsys.h:43.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_DRAW_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:44.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_DRAW_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:45.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_SOCKET_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:46.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_SOCKET_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:47.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_STDOUT_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:48.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_STDOUT_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:49.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_STDERR_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:50.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_STDERR_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:51.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_BINARY_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:52.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_BINARY_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:53.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_MATLAB_WORLD
1
Error: Unclassifiable statement at (1)
petscsys.h:54.6:
Included at petscexe.F:2:
PetscFortranAddr PETSC_VIEWER_MATLAB_SELF
1
Error: Unclassifiable statement at (1)
petscsys.h:75.6:
Included at petscexe.F:2:
PetscEnum PETSC_INT
1
Error: Unclassifiable statement at (1)
petscsys.h:76.6:
Included at petscexe.F:2:
PetscEnum PETSC_DOUBLE
1
Error: Unclassifiable statement at (1)
petscsys.h:77.6:
Included at petscexe.F:2:
PetscEnum PETSC_COMPLEX
1
Error: Unclassifiable statement at (1)
petscsys.h:78.6:
Included at petscexe.F:2:
PetscEnum PETSC_LONG
1
Error: Unclassifiable statement at (1)
petscsys.h:79.6:
Included at petscexe.F:2:
PetscEnum PETSC_SHORT
1
Error: Unclassifiable statement at (1)
Fatal Error: Error count reached limit of 25.
What is this error? Thanks a lot!
You have to use -cpp -dM as necessary flags when doing compilation. Besides, you have to use C++/C style, i.e., #include + ..., for the including .

Resources