When compiling facebook flow, with Ubuntu 14.04 64 bit, I get an error. Does anyone know what the problem is?
ubuntu#ubuntu:~/Downloads/flow-0.18.1$ make
mkdir -p bin
tar czf bin/flowlib.tar.gz -C lib .
echo "const char* const BuildInfo_kRevision = \"$(git rev-parse HEAD 2>/dev/null || hg identify -i)\";" > hack/utils/get_build_id.gen.c
abort: there is no Mercurial repository here (.hg not found)
ocamlbuild -ocamlc "ocamlopt -ccopt -DNO_LZ4"\
hack/third-party/inotify/inotify_stubs.o hack/heap/hh_shared.o hack/hhi/hhi_elf.o hack/utils/files.o hack/utils/get_build_id.gen.o hack/utils/get_build_id.o hack/utils/handle_stubs.o hack/utils/nproc.o hack/utils/realpath.o hack/utils/sysinfo.o src/embedded/flowlib_elf.o
+ ocamlopt -ccopt -DNO_LZ4 -c hack/hhi/hhi_elf.c
hack/hhi/hhi_elf.c: In function ‘get_embedded_hhi_data’:
hack/hhi/hhi_elf.c:116:3: warning: ‘elf_getshstrndx’ is deprecated (declared at /usr/include/libelf.h:260) [-Wdeprecated-declarations]
int stat = elf_getshstrndx(e, &shstrndx);
^
+ ocamlopt -ccopt -DNO_LZ4 -c src/embedded/flowlib_elf.c
src/embedded/flowlib_elf.c: In function ‘get_embedded_flowlib_data’:
src/embedded/flowlib_elf.c:65:3: warning: ‘elf_getshstrndx’ is deprecated (declared at /usr/include/libelf.h:260) [-Wdeprecated-declarations]
int stat = elf_getshstrndx(e, &shstrndx);
^
Finished, 22 targets (0 cached) in 00:00:01.
ocamlbuild -no-links -I src/commands -I src/common -I src/dts -I src/embedded -I src/parser -I src/parsing -I src/server -I src/stubs -I src/typing -I hack/deps -I hack/dfind -I hack/find -I hack/globals -I hack/heap -I hack/parsing -I hack/procs -I hack/search -I hack/socket -I hack/stubs -I hack/third-party/avl -I hack/third-party/core -I hack/utils -I hack/third-party/inotify -I hack/fsnotify_linux -lib unix -lib str -lflags "hack/third-party/inotify/inotify_stubs.o hack/heap/hh_shared.o hack/hhi/hhi_elf.o hack/utils/files.o hack/utils/get_build_id.gen.o hack/utils/get_build_id.o hack/utils/handle_stubs.o hack/utils/nproc.o hack/utils/realpath.o hack/utils/sysinfo.o src/embedded/flowlib_elf.o -cclib -l -cclib elf " src/flow.native
Here's the error:
+ /usr/bin/ocamlc -c -w A -warn-error A -w -27-32-34-45 -w -4-6-29-35-44-48-50 -I src/server -I hack/find -I hack/procs -I hack/fsnotify_linux -I hack/heap -I hack/deps -I hack/globals -I hack/dfind -I hack/parsing -I hack/stubs -I hack/search -I hack/utils -I hack/socket -I hack/third-party/inotify -I hack/third-party/avl -I hack/third-party/core -I src/commands -I src/dts -I src/typing -I src/parsing -I src/stubs -I src/common -I src/parser -I src/embedded -o src/server/autocompleteService_js.cmo src/server/autocompleteService_js.ml
And specifics:
File "src/server/autocompleteService_js.ml", line 128, characters 14-29:
Error: Unbound value Debug.json_of_t
Command exited with code 2.
Compilation unsuccessful after building 114 targets (0 cached) in 00:00:05.
make: *** [build-flow] Error 10
Related
I'm trying to compile a basic Qt program:
#include <iostream>
#include <QApplication>
int main(int argc, char** argv) {
QApplication app(argc, argv);
std::cout << "test" << std::endl;
}
To start a Qt-project I did the following:
Make a project.pro file:
TEMPLATE += app
QT += widgets gui
SOURCES += main.cpp
Run the qmake command.
Edit the following in the generated Makefile:
-mmacosx-version-min=10.15.3 in CXXFLAGS
remove the -c argument from the compiler
Than I ran make and got the following error output:
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -O2 -std=gnu++11 -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.15.3 -Wall -Wextra -fPIC -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.1/lib -o main.o main.cpp
Undefined symbols for architecture x86_64:
"QApplication::QApplication(int&, char**, int)", referenced from:
_main in main-96fd09.o
"QApplication::~QApplication()", referenced from:
_main in main-96fd09.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main.o] Error 1
I might have an idea what is causing this, when running make -v I get this output:
This program built for i386-apple-darwin11.3.0
clang++ --version generates this output:
Apple clang version 11.0.0 (clang-1100.0.33.16)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
I think the Makefile is trying to compile my code for an older architecture and that's generating a conflict but I'm not sure. My system is a Macbook Pro running MacOS Catalina 10.15.3. Qt is version 15.4.1. Qmake is version 3.1.
Full Makefile:
#############################################################################
# Makefile for building: test.app/Contents/MacOS/test
# Generated by qmake (3.1) (Qt 5.14.1)
# Project: test.pro
# Template: app
# Command: /usr/local/Cellar/qt/5.14.1/bin/qmake -o Makefile test.pro
#############################################################################
MAKEFILE = Makefile
EQ = =
####### Compiler, tools and options
CC = /Library/Developer/CommandLineTools/usr/bin/clang
CXX = /Library/Developer/CommandLineTools/usr/bin/clang++
DEFINES = -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wall -Wextra -fPIC $(DEFINES)
CXXFLAGS = -pipe -stdlib=libc++ -O2 -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.15.3 -Wall -Wextra -fPIC $(DEFINES)
INCPATH = -I. -I/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Headers -I. -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.14.1/lib
QMAKE = /usr/local/Cellar/qt/5.14.1/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /usr/local/Cellar/qt/5.14.1/bin/qmake -install qinstall
QINSTALL_PROGRAM = /usr/local/Cellar/qt/5.14.1/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = test1.0.0
DISTDIR = /Users/myName/School/C++/QtTest/.tmp/test1.0.0
LINK = /Library/Developer/CommandLineTools/usr/bin/clang++
LFLAGS = -stdlib=libc++ -headerpad_max_install_names $(EXPORT_ARCH_ARGS) -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wl,-rpath,#executable_path/../Frameworks
LIBS = $(SUBLIBS) -F/usr/local/Cellar/qt/5.14.1/lib -framework QtWidgets -framework QtGui -framework AppKit -framework Metal -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
AR = /Library/Developer/CommandLineTools/usr/bin/ar cq
RANLIB = /Library/Developer/CommandLineTools/usr/bin/ranlib -s
SED = sed
STRIP = strip
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = main.cpp
OBJECTS = main.o
DIST = /usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/mac.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/rez.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/asset_catalogs.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/testcase_targets.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/exceptions.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/yacc.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf \
MORE FILES HERE
test.pro main.cpp
QMAKE_TARGET = test
DESTDIR =
TARGET = test.app/Contents/MacOS/test
####### Custom Variables
EXPORT_QMAKE_MAC_SDK = macosx
EXPORT_QMAKE_MAC_SDK_VERSION = 10.15.1
EXPORT_QMAKE_XCODE_DEVELOPER_PATH = /Library/Developer/CommandLineTools
EXPORT_VALID_ARCHS = x86_64
EXPORT_ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
EXPORT_ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
EXPORT__PRO_FILE_ = /Users/myName/School/C++/QtTest/test.pro
include /usr/local/Cellar/qt/5.14.1/mkspecs/features/mac/sdk.mk
first: all
####### Build rules
test.app/Contents/MacOS/test: $(OBJECTS)
#test -d test.app/Contents/MacOS/ || mkdir -p test.app/Contents/MacOS/
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: test.pro /usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang/qmake.conf /usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/exceptions.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/yacc.prf \
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf \
test.pro \
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Resources/QtWidgets.prl \
/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Resources/QtGui.prl \
/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Resources/QtCore.prl
MORE FILES HERE
$(QMAKE) -o Makefile test.pro
/usr/local/Cellar/qt/5.14.1/mkspecs/features/spec_pre.prf:
/usr/local/Cellar/qt/5.14.1/mkspecs/qdevice.pri:
/usr/local/Cellar/qt/5.14.1/mkspecs/features/device_config.prf:
/usr/local/Cellar/qt/5.14.1/mkspecs/common/unix.conf:
/usr/local/Cellar/qt/5.14.1/mkspecs/common/mac.conf:
/usr/local/Cellar/qt/5.14.1/mkspecs/features/lex.prf:
test.pro:
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Resources/QtWidgets.prl:
/usr/local/Cellar/qt/5.14.1/lib/QtGui.framework/Resources/QtGui.prl:
/usr/local/Cellar/qt/5.14.1/lib/QtCore.framework/Resources/QtCore.prl:
MORE FILES HERE
qmake: FORCE
#$(QMAKE) -o Makefile test.pro
qmake_all: FORCE
test.app/Contents/PkgInfo:
#test -d test.app/Contents || mkdir -p test.app/Contents
#$(DEL_FILE) test.app/Contents/PkgInfo
#echo "APPL????" > test.app/Contents/PkgInfo
test.app/Contents/Resources/empty.lproj:
#test -d test.app/Contents/Resources || mkdir -p test.app/Contents/Resources
#touch test.app/Contents/Resources/empty.lproj
test.app/Contents/Info.plist:
#test -d test.app/Contents || mkdir -p test.app/Contents
#$(DEL_FILE) test.app/Contents/Info.plist
#sed -e "s,#SHORT_VERSION#,1.0,g" -e "s,\$${QMAKE_SHORT_VERSION},1.0,g" -e "s,#FULL_VERSION#,1.0.0,g" -e "s,\$${QMAKE_FULL_VERSION},1.0.0,g" -e "s,#TYPEINFO#,????,g" -e "s,\$${QMAKE_PKGINFO_TYPEINFO},????,g" -e "s,#BUNDLEIDENTIFIER#,com.yourcompany.test,g" -e "s,\$${PRODUCT_BUNDLE_IDENTIFIER},com.yourcompany.test,g" -e "s,\$${MACOSX_DEPLOYMENT_TARGET},10.13,g" -e "s,\$${IPHONEOS_DEPLOYMENT_TARGET},,g" -e "s,\$${TVOS_DEPLOYMENT_TARGET},,g" -e "s,\$${WATCHOS_DEPLOYMENT_TARGET},,g" -e "s,#ICON#,,g" -e "s,\$${ASSETCATALOG_COMPILER_APPICON_NAME},,g" -e "s,#EXECUTABLE#,test,g" -e "s,#LIBRARY#,test,g" -e "s,\$${EXECUTABLE_NAME},test,g" -e "s,#TYPEINFO#,????,g" -e "s,\$${QMAKE_PKGINFO_TYPEINFO},????,g" /usr/local/Cellar/qt/5.14.1/mkspecs/macx-clang/Info.plist.app >test.app/Contents/Info.plist
all: Makefile \
test.app/Contents/PkgInfo \
test.app/Contents/Resources/empty.lproj \
test.app/Contents/Info.plist test.app/Contents/MacOS/test
dist: distdir FORCE
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
distdir: FORCE
#test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp $(DISTDIR)/
$(COPY_FILE) --parents main.cpp $(DISTDIR)/
clean: compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
distclean: clean
-$(DEL_FILE) -r test.app
-$(DEL_FILE) .qmake.stash
-$(DEL_FILE) Makefile
####### Sub-libraries
xcodeproj:
#$(QMAKE) -spec macx-xcode "$(EXPORT__PRO_FILE_)"
mocclean: compiler_moc_header_clean compiler_moc_objc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_objc_header_make_all compiler_moc_source_make_all
check: first
benchmark: first
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_moc_predefs_make_all: moc_predefs.h
compiler_moc_predefs_clean:
-$(DEL_FILE) moc_predefs.h
moc_predefs.h: /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp
/Library/Developer/CommandLineTools/usr/bin/clang++ -pipe -stdlib=libc++ -O2 -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.13 -Wall -Wextra -dM -E -o moc_predefs.h /usr/local/Cellar/qt/5.14.1/mkspecs/features/data/dummy.cpp
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_moc_objc_header_make_all:
compiler_moc_objc_header_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_rez_source_make_all:
compiler_rez_source_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_predefs_clean
####### Compile
main.o: main.cpp /usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers/QApplication \
/usr/local/Cellar/qt/5.14.1/lib/QtWidgets.framework/Headers/qapplication.h
$(CXX) $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
Thanks!
I made a very basic mistake. Everything was working, but the Makefile outputted a main.o file. I tried to execute my application by using ./main.o. This is not possible.
The correct way to execute a Qt application is by using open main.app.
No need to alter the makefile.
Create a myApp.pro file
Example:
TEMPLATE += app
QT += widgets gui
SOURCES += myApp.cpp
Execute qmake
Execute make
Execute open myApp.app
The SR Programming language is no longer being maintained, so I realize my chances of finding help on this issue might be slim. However, I need the language installed for classroom purposes and can't think of how to proceed.
Here's the seemingly sole source of information on the web about the language
http://www.cs.arizona.edu/sr/
The install package provides a Makefile for installation. However, running the following:
mkdir /usr/local/src/sr
cd /usr/local/src/sr
wget ftp://ftp.cs.arizona.edu/sr/sr.tar.Z
tar xzf sr.tar.Z
make
results in these errors
echo "#" >paths.sh
echo "# Created mechanically; DO NOT EDIT THIS FILE." >>paths.sh
echo "#" >>paths.sh
sed -n >>paths.sh <Configuration \
-e 's/#.*//' -e 's/[ ]*$//' -e 's/ *= */=/' \
-e 's/="*\(.* [^"]*\)"*$/="\1"/' -e '/^[A-Z0-9_]* *=/p'
echo "" >>paths.sh
echo >paths.tmp '/*'
echo >>paths.tmp ' * Created mechanically; DO NOT EDIT THIS FILE.'
echo >>paths.tmp ' */'
sed >>paths.tmp <paths.sh \
-n -e 's/"//g' -e 's/.*/#define &"/' -e 's/= */ "/p'
if cmp -s paths.tmp paths.h; then :; else cp paths.tmp paths.h; fi
cc -g -c -o util.o util.c
util.c: In function ‘salloc’:
util.c:79:27: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
return strcpy (alloc (strlen (s) + 1), s);
^
util.c: In function ‘strtail’:
util.c:94:14: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
int ls = strlen (s);
^
util.c: In function ‘setpath’:
util.c:221:25: warning: incompatible implicit declaration of built-in function ‘strlen’ [enabled by default]
searchpath = alloc (strlen (evpath) + strlen (ifdir) + 100);
^
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:0:
../arch.h:147:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘--’ token
ERROR -- no architecture selected
^
main.c:114:1: warning: conflicting types for ‘options’ [enabled by default]
options (argc, argv)
^
main.c:114:1: error: static declaration of ‘options’ follows non-static declaration
main.c:53:5: note: previous implicit declaration of ‘options’ was here
options (argc, argv); /* process options */
^
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
I figured that this might be a problem with the compiler version I was using. gcc -v returns gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04), and the install files seem to be made to compile on earlier versions. I tried installing an earlier version of gcc such that gcc -v yields gcc version 3.4.6 (Debian 3.4.6-5), but ran into similar yet different compiler errors. Perhaps I did something wrong with the downgraded install because it seems weird that it says Debian 3.4.6-5.
The package also provides a install.sh file. Trying
chmod +x /usr/local/src/sr/install.sh
/usr/local/src/sr/install.sh
returns the following:
+ cp sr/sr /usr/local/bin
cp: cannot stat ‘sr/sr’: No such file or directory
+ strip /usr/local/bin/sr
strip: Warning: '/usr/local/bin/sr' is not an ordinary file
+ cp srl/srl /usr/local/bin
cp: cannot stat ‘srl/srl’: No such file or directory
+ strip /usr/local/bin/srl
strip: Warning: '/usr/local/bin/srl' is not an ordinary file
+ cp srm/srm /usr/local/bin
cp: cannot stat ‘srm/srm’: No such file or directory
+ strip /usr/local/bin/srm
strip: Warning: '/usr/local/bin/srm' is not an ordinary file
+ cp srprof/srprof /usr/local/bin
cp: cannot stat ‘srprof/srprof’: No such file or directory
+ strip /usr/local/bin/srprof
strip: Warning: '/usr/local/bin/srprof' is not an ordinary file
+ cp srtex/srtex /usr/local/bin
cp: cannot stat ‘srtex/srtex’: No such file or directory
+ strip /usr/local/bin/srtex
strip: Warning: '/usr/local/bin/srtex' is not an ordinary file
+ cp srlatex/srlatex /usr/local/bin
cp: cannot stat ‘srlatex/srlatex’: No such file or directory
+ strip /usr/local/bin/srlatex
strip: Warning: '/usr/local/bin/srlatex' is not an ordinary file
+ cp srgrind/srgrind /usr/local/bin
cp: cannot stat ‘srgrind/srgrind’: No such file or directory
+ cp preproc/*2sr /usr/local/bin
cp: cannot stat ‘preproc/*2sr’: No such file or directory
+ cp sr.h /usr/local/lib/sr
+ cp srmulti.h /usr/local/lib/sr
+ cp rts/srlib.a /usr/local/lib/sr
cp: cannot stat ‘rts/srlib.a’: No such file or directory
+ [ -f /bin/ranlib -o -f /usr/bin/ranlib ]
+ ranlib /usr/local/lib/sr/srlib.a
ranlib: '/usr/local/lib/sr/srlib.a': No such file
+ cp library/*.o /usr/local/lib/sr
cp: cannot stat ‘library/*.o’: No such file or directory
+ cp library/*.spec /usr/local/lib/sr
cp: cannot stat ‘library/*.spec’: No such file or directory
+ cp library/*.impl /usr/local/lib/sr
cp: cannot stat ‘library/*.impl’: No such file or directory
+ cp srmap /usr/local/lib/sr
+ cp rts/srx /usr/local/lib/sr
cp: cannot stat ‘rts/srx’: No such file or directory
+ strip /usr/local/lib/sr/srx
strip: '/usr/local/lib/sr/srx': No such file
+ cp srlatex/srlatex.sty /usr/local/lib/sr
+ cp preproc/ccr2sr.h preproc/csp2sr.h preproc/m2sr.h /usr/local/lib/sr
+ cp sr-mode.el /usr/local/lib/sr
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing man pages for commands
not installing man pages for commands
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing sranimator/srgetopt/srwin man pages
not installing sranimator/srgetopt/srwin man pages
+ [ ! -z /usr/man/manl -a -d /usr/man/manl -a ! -z l ]
+ echo not installing srmap/srtrace man pages
not installing srmap/srtrace man pages
+ exit 0
and nothing happens.
Can anyone make sense of these errors or at least give advice on how to proceed? It might seem futile because the language hasn't been maintained in a decade, but any advice would help me out tremendously.
Thank you
Update:
My Colleague provided these changes to the ./Configuration file:
sed -i -e "s:/usr/local:/usr:" -e "s:/usr/X11/lib:/usr/lib:" \
-e "s:CCPATH = /bin/cc:CCPATH = /usr/bin/gcc" \
-e "s:RSHPATH = /usr/ucb/rsh:RSHPATH = /usr/bin/ssh:" \
-e "s:VFPATH = /usr/lib/vfontedpr:VFPATH = :" Configuration
Running make on gcc 4.8.4 after this gives
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:0:
../arch.h:147:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘--’ token
ERROR -- no architecture selected
^
main.c:114:1: warning: conflicting types for ‘options’ [enabled by default]
options (argc, argv)
^
main.c:114:1: error: static declaration of ‘options’ follows non-static declaration
main.c:53:5: note: previous implicit declaration of ‘options’ was here
options (argc, argv); /* process options */
^
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
It gets rid of the initial pathing issues, but the compiler issues are still there.
With gcc 3.4 it gives
cmp -s multi/uni.h srmulti.h || cp multi/uni.h srmulti.h
cmp -s multi/uni.c srmulti.c || cp multi/uni.c srmulti.c
cd sr; make CC="cc" CFLAGS="-g "
make[1]: Entering directory `/usr/local/src/sr/sr'
cc -g -c -o main.o main.c
In file included from main.c:7:
../arch.h:147: error: syntax error before '--' token
main.c:115: error: conflicting types for 'options'
main.c:53: error: previous implicit declaration of 'options' was here
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/usr/local/src/sr/sr'
make: *** [all] Error 2
"SR" : Old files → → year 2001 !
"SR" compiles OK with gcc version 3.2.3 or gcc version 3.4.6 (
Edit the file 'Configuration'. (
No gcc32 for Ubuntu 14.04 ).)
# make install : Provides /usr/local/bin/sr
P.S. : gcc34 is available for Ubuntu 14.04 :
compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb, or compat-gcc34_3.4.6-ubuntu15_i386.deb
I'm compiling sipXtapi and I need to compile with this line
gcc -shared -DPIC .libs/codec_pcmapcmu_la-CodecPcmaWrapper.o .libs/codec_pcmapcmu_la-CodecPcmuWrapper.o .libs/codec_pcmapcmu_la-G711.o .libs/codec_pcmapcmu_la-PlgPcmaPcmu.o -lc -W1,-soname=codec_pcmapcmu.so -o .libs/codec_pcmapcmu.so
gcc: error: unrecognized command line option ‘-W1,-soname=codec_pcmapcmu.so’
and this is the Makefile.am:
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/../sipXportLib/include -I$(top_srcdir)/contrib/libspandsp/src
pkgdata_LTLIBRARIES = codec_pcmapcmu.la
codec_pcmapcmu_la_SOURCES = \
CodecPcmaWrapper.c \
CodecPcmuWrapper.c \
G711.c \
PlgPcmaPcmu.c
if PCMAPCMU_STATIC
codec_pcmapcmu_la_CFLAGS = -DCODEC_STATIC
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version -static else
codec_pcmapcmu_la_LDFLAGS = -module -avoid-version
all-local: codec_pcmapcmu.la
echo "Installing plugin codec_pcmapcmu.so ..."
cp -f .libs/codec_pcmapcmu.so #DEFAULT_CODECS_PATH#
clean-local:
rm -f #DEFAULT_CODECS_PATH#/codec_pcmapcmu.so endif
how can I solve the problem?
There's a spelling error there -W1 should be -Wl (that's a lower case L instead of the digit 1)
I have been struggling with this error when I try to run the configure script. It is a 12 years old library. First I tried to generate the configure script by using modern version of all the autotools and GCC.
Then, I tried to generate it by using tools versions of that time but when I run the configure file I still get the same errors which is always the broken variable CPPFLAGS
Here is the configure error:
checking for GMP library... checking for gmp.h...
configure: error: Could not find gmp.h header
Here is the config.log section which describe the error:
configure:22748: gcc34 -c -g -O2 -I/home/vicente/build/chord/../sfslite -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/async -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/arpc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/crypt -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/sfsmisc -I/home/vicente/build/chord/../sfslite/$(srcdir); export srcdir; \
/home/vicente/sfslite/libsfs -I/home/vicente/build/chord/../sfslite/svc -I/usr/include conftest.c >&5
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
gcc34: export: No such file or directory
gcc34: srcdir;: No such file or directory
gcc34: \: No such file or directory
configure:22754: $? = 1
configure: failed program was:
I wonder if there is someone who went through a similar problem.
Thanks!
Version of tools:
GCC 3.4, 4.4, 4.7.2
Autoconf/aclocal/autoheader 2.59, 2.69
Automake 1.9.6, 1.15
OS: Centos 5.9, Ubuntu 12.04 all of them 64bits
Link of the program:
https://github.com/sit/dht
EDITED:
Here is the section of the configure script around the line 22754:
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "gmp.h"
int
main ()
{
0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 # line 22754
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
sfs_cv_gmp_h="${iflags}"; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
I am trying to use E²LSH, here is the manual. When untarred, the folder of this library has a Makefile, a bin folder and a source folder (among with other stuff).
In the source folder there is LSHMain.cpp, which I have to modify.
I deleted the project (just to make sure I haven't destroyed something), re-download it, modifying the file and then I hit make, but when I run the executable it is like all my modifications are gone and the original code is taken into account only!
This happens regardless of building the project from scratch or not.
I suspect that this has to do with the scripts inside bin folder, because I have to run it like this:
bin/lsh argument_list
What should I change?
Here is the Makefile (reduced, since some stuff is irrelevant)
SOURCES_DIR:=sources
OBJ_DIR:=bin
OUT_DIR:=bin
TEST_DIR:=$(SOURCES_DIR)
#H_SOURCES:=`find $(SOURCES_DIR) -name "*.h"`
#CPP_SOURCES:=`find $(SOURCES_DIR) -name "*.cpp"`
#TEST_SOURCES:=`find $(TEST_DIR) -name "*.cpp"`
OBJ_SOURCES:=$(SOURCES_DIR)/BucketHashing.cpp \
$(SOURCES_DIR)/Geometry.cpp \
$(SOURCES_DIR)/LocalitySensitiveHashing.cpp \
$(SOURCES_DIR)/Random.cpp \
$(SOURCES_DIR)/Util.cpp \
$(SOURCES_DIR)/GlobalVars.cpp \
$(SOURCES_DIR)/SelfTuning.cpp \
$(SOURCES_DIR)/NearNeighbors.cpp
LSH_BUILD:=LSHMain
TEST_BUILDS:=exactNNs \
genDS \
compareOutputs \
genPlantedDS
GCC:=g++
OPTIONS:=-O3 -DREAL_FLOAT -DDEBUG
# -march=athlon -msse -mfpmath=sse
LIBRARIES:=-lm
#-ldmalloc
all:
bin/compile
c: compile
compile:
#mkdir -p $(OUT_DIR)
$(GCC) -o $(OUT_DIR)/$(LSH_BUILD) $(OPTIONS) $(OBJ_SOURCES) $(SOURCES_DIR)/$(LSH_BUILD).cpp $(LIBRARIES)
chmod g+rwx $(OUT_DIR)/$(LSH_BUILD)
and here are the compile and lsh scripts (inside the bin folder, the Makefile was in the same directory with source and bin folders):
#!/bin/bash
OUT_DIR=bin
SOURCES_DIR=sources
OBJ_SOURCES="$SOURCES_DIR/BucketHashing.cpp \
$SOURCES_DIR/Geometry.cpp \
$SOURCES_DIR/LocalitySensitiveHashing.cpp \
$SOURCES_DIR/Random.cpp \
$SOURCES_DIR/Util.cpp \
$SOURCES_DIR/GlobalVars.cpp \
$SOURCES_DIR/SelfTuning.cpp \
$SOURCES_DIR/NearNeighbors.cpp"
TEST_BUILDS="exactNNs \
genDS \
compareOutputs \
genPlantedDS"
defineFloat=REAL_FLOAT
g++ -o $OUT_DIR/testFloat -DREAL_FLOAT $OBJ_SOURCES $SOURCES_DIR/testFloat.cpp -lm >/dev/null 2>&1 || defineFloat=REAL_DOUBLE
OPTIONS="-O3 -D$defineFloat"
g++ -o $OUT_DIR/LSHMain $OPTIONS $OBJ_SOURCES $SOURCES_DIR/LSHMain.cpp -lm
chmod g+rwx $OUT_DIR/LSHMain
for i in $TEST_BUILDS; do
g++ -o ${OUT_DIR}/$i $OPTIONS ${SOURCES_DIR}/${i}.cpp $OBJ_SOURCES -lm; chmod g+rwx $OUT_DIR/${i};
done
the lsh script
#!/bin/bash
dir=bin
if [ $# -le 2 ]; then
echo Usage: $0 radius data_set_file query_set_file "[successProbability]"
exit
fi
paramsFile=$2.params
if [ $# -ge 4 ]; then
# success probability supplied
$dir/lsh_computeParams $1 "$2" "$3" $4 > "$paramsFile" || exit 1
else
# success probability not supplied
$dir/lsh_computeParams $1 "$2" "$3" > "$paramsFile" || exit 1
fi
chmod g+rw "$paramsFile"
echo "R*******" >/dev/stderr
echo "R*********************" >/dev/stderr
echo "R-NN DS params computed." >/dev/stderr
echo "R*********************" >/dev/stderr
echo "R*******" >/dev/stderr
$dir/lsh_fromParams "$2" "$3" "$paramsFile"
EDIT_1
When I run make I get:
bin/compile
sources/LocalitySensitiveHashing.cpp: In function ‘RNNParametersT readRNNParameters(FILE*)’:
sources/LocalitySensitiveHashing.cpp:62:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
(many many warnings, but no errors, I have checked that I can execute the program afterwards)
With make c I got:
g++ -o bin/LSHMain -O3 -DREAL_FLOAT -DDEBUG sources/BucketHashing.cpp sources/Geometry.cpp sources/LocalitySensitiveHashing.cpp sources/Random.cpp sources/Util.cpp sources/GlobalVars.cpp sources/SelfTuning.cpp sources/NearNeighbors.cpp sources/LSHMain.cpp -lm
warnings
chmod g+rwx bin/LSHMain
I really don't get why this didn't work....
With make compile I got:
g++ -o bin/LSHMain -O3 -DREAL_FLOAT -DDEBUG sources/BucketHashing.cpp sources/Geometry.cpp sources/LocalitySensitiveHashing.cpp sources/Random.cpp sources/Util.cpp sources/GlobalVars.cpp sources/SelfTuning.cpp sources/NearNeighbors.cpp sources/LSHMain.cpp -lm
warnings
chmod g+rwx bin/LSHMain
EDIT_2
the lsh_comouteParams is this:
#!/bin/bash
successProbability=0.9
if [ $# -le 1 ]; then
echo Usage: $0 radius data_set_file "{query_set_file | .} [successProbability]"
exit
fi
if [ $# -ge 4 ]; then
# success probability supplied
successProbability=$4
fi
arch=`uname`
nDataSet=` wc -l "$2"`
for x in $nDataSet; do nDataSet=$x; break; done
if [ "$3" != "." ]; then
nQuerySet=` wc -l "$3"`
for x in $nQuerySet; do nQuerySet=$x; break; done
else
nQuerySet=0
fi
dimension=`head -1 "$2" | wc -w`
#echo $nDataSet $nQuerySet $dimension
if [ -e bin/mem ]; then
m=`cat bin/mem`;
elif [ "$arch" = "Darwin" ]
then
#http://discussions.apple.com/thread.jspa?threadID=1608380&tstart=0
m=`top -l 1 | grep PhysMem | awk -F "[M,]" ' {print$10 }'`
let m=m*1024*1024
echo $m > bin/mem
else
s=`free -m | grep "Mem:"`
for i in $s; do m=$i; if [ "$i" != "Mem:" ]; then break; fi; done
m=${m}000000
echo $m > bin/mem
fi
bin/LSHMain $nDataSet $nQuerySet $dimension $successProbability "$1" "$2" "$3" $m -c
I had modified the file as such:
int main(int nargs, char **args){
printf("uoo\n");return 0;
if(nargs < 9){
usage(args[0]);
exit(1);
}
...
}
When E²LSH doesn't receive the correct arguments, it won't run it's LSHMain (regardless the fact that there is a relevant code for that in that file - which what tricked me so badly, because I thought that I was reaching that point inside main()).
There is a script in bin folder which will take over and print the very same message as usage() would print, that's why I thought that I was reaching that call. The function call lies inside if(nargs < 9), which made me to give in purpose less arguments so that it would sure fall inside that if and won't execute the algorithm (which takes time).
In short:
In order to reach the point that the code source/LSHMain.cpp gets executed one must pass the correct arguments to to bin/lsh. If not, bin/lsh script will only be executed, thus shadowing the modifications made in source/LSHMain.cpp.
Hope that this answer will make future users to avoid such a trap. Special thanks to Etan Reisner that helped me and eventually made me think to delete source/LSHMain.cpp, which made me to figure out what was happening.