build_iphone.sh: line 52: /Users/.../pocketsphinx-master/configure: No such file or directory - ios

I'm on macOS Mojave in terminal, and I'm getting an error that says no such file or directory for the directory ".../pocketsphinx-master/configure" when I run build_iphone.sh, which I got from this repository: cmusphinx/pocketsphinx-ios-demo.
The instructions for pocketsphinx found at this repository -- cmusphinx/pocketsphinx gives these instructions to use pocketsphinx with Xcode. Here's part of what it says, which I don't understand:
Pocketsphinx uses the standard unix autogen system, you can build pocketsphinx with automake given you already built sphinxbase You just need to pass correct configure arguments, set compiler path, set sysroot and other options. After you build the code you need to import dylib file into your project and you also need to configure includes for your project to find sphinxbase headers.
Here is what my terminal on my Mac mini looks like:
Daniels-Mac-mini:pocketsphinx-master shinehah$ sh build_iphone.sh
building arm64...
build_iphone.sh: line 52: /Users/shinehah/cmusphinx/pocketsphinx-master/configure: No such file or directory
I created that directory, but I still get the same error message. What do I need to put in that directory?
In build_iphone.sh, line 52, it says:
--host="${HOST_TYPE}" \
Here is the code segment it is from:
$CWD/configure
--host="${HOST_TYPE}" // line 52
--prefix="$DEST/$ARCH"
--without-lapack
--without-python
--with-sphinxbase="$SPHINXBASE_DIR"
|| exit 1

Related

fatal error: zbar.h: No such file or directory

I downloaded the zbar library and cloned the opencv-zbar repo in my home directory. Then I ran the following command $cmake . which gave my the error
-- Could NOT find ZBAR (missing: ZBAR_LIBRARIES ZBAR_INCLUDE_DIR)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZBAR_LIBRARIES
linked by target "zbar_opencv" in directory /home/surabhi/opencv-zbar
-- Configuring incomplete, errors occurred!
See also "/home/surabhi/opencv-zbar/CMakeFiles/CMakeOutput.log".
I then made two changes in my CMakeCache.txt as follows
//Path to a file.
ZBAR_INCLUDE_DIR:PATH=/usr/include/zbar
//Path to a library.
ZBAR_LIBRARIES:FILEPATH=/usr/lib/libzbar.so
because the were set to NOTFOUND.
It then gave me no errors
-- Found ZBAR: /usr/lib/libzbar.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/surabhi/opencv-zbar
But when I run make
It gives the error:
fatal error: zbar.h: No such file or directory
#include <zbar.h>
^
compilation terminated.
I don't understand why I get this error as It says Found ZBAR when I run cmake.
Thanks in advance
You need to do actually use the include dirs somewhere in your CMakeLists.txt so CMake knows that you actually want to use these include paths.
Examples:
include_directories(${ZBAR_INCLUDE_DIR})
Or the more modern, recommended way:
target_include_directories(zbar_opencv PRIVATE ${ZBAR_INCLUDE_DIR})

No such file or directory when generate framework

When I make a new framework with aggregate to generate universal framework , but a error present , as follow :
cp: build/Release-iphoneos/TEST.framework/: No such file or directory
fatal error: lipo: can't open input file: build/Release-iphoneos/TEST.framework/TEST (No such file or directory)
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
And here is a screenshot of the error:
This is a new target , I only want to test generate framework , but fail!
As the error message said, no TEST.framework can be found in the path <PROJECT_DIR>/build/Release-iphoneos/TEST.framework.
You need to check the script you use, or the blog post which you reference is out-date.
First you should build the target specified in xcodebuild command directly to see if it can build succeed.
Check what the actual build path is. If the path(build/) is not exist, you can try to specified the build path for xcodebuild, OBJROOT=${WRK_DIR} SYMROOT=${WRK_DIR}

How to refer to data files in a pkg-config package with the autotools and pkg-config?

I'm attempting to create a Homebrew formula for gtk-mac-integration. Running make in bindings/python/gtkosx_application fails:
/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/Cellar/gtk-mac-integration/2.0.7/share/pygobject/2.0/codegen/h2def.py': [Errno 2] No such file or directory
make[3]: *** [gtkosx_application.defs] Error 2
This is because the Makefile tries to find the h2def.py file in the wrong location:
gtkosx_application.defs: $(headers)
$(PYTHON) $(datadir)/pygobject/2.0/codegen/h2def.py $(headers) > $#
It is clear to me why this is failing: $(datadir) points to the share directory of the package that is to be installed (gkt-mac-integration). Because Homebrew installs all packages into their own prefix (/usr/local/Cellar/...), it is not the same for gtk-mac-integration and pygobject.
I know it is possible to find out where the pygobject data directory is located using
pkg-config --variable=datadir pygobject-2.0
I don't suppose the correct fix is to replace datadir in the Makefile with the string above? How should I adjust configure.ac and Makefile.am to make this work properly?
Yeah, that sounds like a bug in the build system.
You can use the inreplace facility to patch this up. Insert this after def install:
inreplace %w[bindings/python/gtkmacintegration/Makefile.am
bindings/python/gtkmacintegration/Makefile.in
bindings/python/gtkosx_application/Makefile.am
bindings/python/gtkosx_application/Makefile.in],
'$(datadir)/pygobject', |
%x[pkg-config --variable=datadir pygobject-2.0].chomp + '/pygobject'
(I tried this out. The formula builds after that.)
You should report this upstream. They should change their build system to sort this out in their configure script.

How to integrate LuaJIT with LuaRocks on Windows?

I downloaded the source of LuaJIT and compiled it with msvc120.dll (VS 2013 x64). When I run it from the command line I have no problems executing some basic lua. Now the LuaJIT installation guide mentions moving luajit.exe and lua51.dll into their own folder. From there it says to create a lua folder and under that a jit folder with the contents of src/jit moved underneath the newly created jit folder.
From my understanding my folder should look like and contain:
luajit.exe
lua51.dll
/lua
/jit
bc.lua
[rest of jit files]
vmdef.lua
Is this correct or am I missing files?
Now after I built my luajit I tried to wire it up into my luarocks to act as my interpreter using
install.bat /LUA C:\LuaJIT\2.0.3\[folder with above content]
However this cannot find the header files. I then copied over what are the header files into the folder above and that wires it up, but I can never actually get anything to compile when pointed over to LuaJIT. Edit: The error I get is the following,
C:\LuaJIT\2.0.3\bin\lua51.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2D0
Error: Failed installing dependency: https://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock - Build error: Failed compiling module lfs.dll
Is the correct way to handle this to simply point to my lua binaries and from there leverage LuaJIT to run my files or am I doing something wrong with wiring up LuaJIT and luarocks? The former seems to work for the most part, since I only ran into one library compilation issue, lua-cjson.
I've run on exactly the same problem, but they've found a solution right here:
https://github.com/keplerproject/luafilesystem/issues/22
I knew that for "linking DLLs statically" there is a so-called "export" .lib file, which is passed to the linker (and not the DLL itself).
So, for example, when compiling, LuaRocks was doing this:
cl /nologo /MD /O2 -c -Fosrc/mime.obj -ID:/LuaJIT-2.0.4/include/ src/mime.c -DLUA_COMPAT_APIINTCASTS -DLUASOCKET_DEBUG -DNDEBUG -DLUASOCKET_API=__declspec(dllexport) -DMIME_API=__declspec(dllexport) mime.c
link -dll -def:core.def -out:mime/core.dll D:/LuaJIT-2.0.4/bin/lua51.dll src/mime.obj
My LuaJIT was compiled from source in D:\LuaJIT-2.0.4\src, but I made two folders myself: D:\LuaJIT-2.0.4\include with all *.h files copied from src and D:\LuaJIT-2.0.4\bin with luajit.exe, lua51.dll, and then later lua51.exp and lua51.lib. Still same error, but this was the right track.
Fix
Now, check where your LuaRocks configs are:
luarocks.bat help
Scroll down to a section like:
CONFIGURATION
Lua version: 5.1
Configuration files:
System: D:/luarocks/config-5.1.lua (ok)
User : (... snip ...)
Edit the System configuration file, specifically see the part:
variables = {
MSVCRT = 'VCRUNTIME140',
LUALIB = 'lua51.dll'
}
Here! LUALIB should be the .lib file. If your export lib is alongside the DLL, you just need to change to:
variables = {
MSVCRT = 'VCRUNTIME140',
LUALIB = 'lua51.lib' -- here!
}
Verification
And now:
luarocks.bat install luasocket
(...)
link -dll -def:core.def -out:socket/core.dll D:/LuaJIT-2.0.4/bin/lua51.lib src/luasocket.obj (...)
(...)
luasocket 3.0rc1-2 is now built and installed in D:\luarocks\systree (license: MIT)
Note the first argument passed to the linker.

problem on setting symfony:sf_sandbox installation failed

im new with symfony....plshelp me how to open the symfony system..
Now i already install symphony version 1.0.0 using the tutorial..
1)When i check at cmd..xampp\php> php –v and symphony –V all is ok..
But when i check for xampp\htdocs\sf_sandbox> symphony –V(i got this msg...)
C:\xampp\htdocs\sf_sandbox>symfony -V
'php.exe' is not recognized as an internal or external command, operable program or batch file.
2)one more problem is when i try run my system at localhost...http://localhost/projects(i got error..)
Warning: require_once(C:\xampp\htdocs\projects\config/../lib/symfony/util/sfCore.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\projects\apps\index\config\config.php on line 7
Fatal error: require_once() [function.require]: Failed opening required 'C:\xampp\htdocs\projects\config/../lib/symfony/util/sfCore.class.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\projects\apps\index\config\config.php on line 7
http://www.programmershere.com/questions-answers/482899-problem-sf_sandbox-installation-failed-check-symfony-v.html#post482904
It appears that in your sf_sandbox installation, you have an incorrect php.exe path.
Edit the symfony.bat file in you sf_sandbox installation.
you'll find something like this
set PHP_COMMAND=php.exe
Replace php.exe with the path of your php.exe file. eg. c:\xampp\php\php.exe
Check the symfony path in your project configuration
sf_sandbox\config\ProjectConfiguration.class.php
Make sure the first "require_once" is pointing to the correct symfony installation
require_once dirname(FILE).'/../lib/symfony/autoload/sfCoreAutoload.class.php';
And, symfony is not spelled as symphony. ;)

Resources