Pod Init not working in Catalina -- git version - ios

when I try to run pod init in Catalina I get the following error:
name#name-MacBook-Pro Lab8-Firebase % pod init
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to
field java.lang.reflect.Field.modifiers
WARNING: Please consider reporting this to the maintainers of
org.jruby.util.SecurityHelper WARNING: Use
--illegal-access=warn to enable warnings of further illegal reflective
access operations
WARNING: All illegal access operations will be denied in a future
release git version 2.29.2
RuntimeError: Failed to extract git version from `git --version` ("")
git_version at /Users/name/.rvm/rubies/jruby-
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods-
1.10.0/lib/cocoapods/command.rb:128 verify_minimum_git_version! at
/Users/name/.rvm/rubies/jruby-
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods-
1.10.0/lib/cocoapods/command.rb:140
run at /Users/name/.rvm/rubies/jruby-
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods-
1.10.0/lib/cocoapods/command.rb:49
<main> at /Users/name/.rvm/rubies/jruby-
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods-1.10.0/bin/pod:55
load at org/jruby/RubyKernel.java:1007
(root) at /Users/name/.rvm/rubies/jruby-
9.2.5.0/bin/pod:1
eval at org/jruby/RubyKernel.java:1046
<main> at /Users/name/.rvm/gems/jruby-
9.2.5.0/bin/jruby_executable_hooks:24
I have tried doing the following:
updating the git version
updating ruby
reinstalling cocoapods
reinstalling homebrew
sudo xcode-select --install (from this SO post).
Any help would be appreciated - thanks.

Check you pod minimum deployment target, it should be 13.0 or higher.
The other issue that might be can be resolved like this: Go to Xcode Preferences then select Location tab and change your Xcode Version at Command Line Tools to your current Xcode version that you are using.

Related

Issues with running remix Binary in Bazel sandbox

I've encountered an issue trying to use bazel as a build tool for remix. I've been able to run remix in dev mode but currently unable to get remix build to work.
I've encountered a few errors that led up to this point. I'll list the errors in the order which they occurred with my fixes (just incase any of the fixes introduces a new issue)
First error in the bazel sandbox is related to a transitive dependency of #remix-run/dev (#remix-run/dev->gunzip-maybe->browserify-zlib). Bazel failed to fetch the bazel repository #npm__browserify-zlib__0.1.4. I assumed this was a bazel issue and tried to override browserify-zlib#0.1.4 with browserify-zlib#0.2.0, which worked. Here is bazel error for reference:
ERROR: /Users/emmanuel/projects/bbbazel/WORKSPACE:89:17: fetching _npm_import rule //external:npm__browserify-zlib__0.1.4: Traceback (most recent call last):
File "/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/aspect_rules_js/npm/private/npm_import.bzl", line 471, column 27, in _impl
pkg_json = json.decode(rctx.read(pkg_json_path))
Error in decode: at offset 685, object has duplicate key: "main"
ERROR: /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/external/npm/BUILD.bazel:3012:6: #npm//:npm__browserify-zlib__0.1.4_source_directory depends on #npm__browserify-zlib__0.1.4//:source_directory in repository #npm__browserify-zlib__0.1.4 which failed to fetch. no such package '#npm__browserify-zlib__0.1.4//': at offset 685, object has duplicate key: "main"
Next error in the bazel sandbox is related to another transitive dependency of #remix-run/dev (#remix-run/dev->xdm->deasync). The install lifecycle hook for the deasync npm package makes a call to the node-gyp binary which doesn't exist in the sandbox and the bazel build command fails during setup. To fix this, I disabled the install lifecycle hook (I also disabled it with a pnpm install outside the sandbox and the remix build command executed perfectly) which led to the final error. Here's the error message for this error:
/Users/emmanuel/projects/bbbazel/BUILD.bazel:5:22: Running lifecycle hooks on npm package deasync#0.1.28 failed: (Exit 1): lifecycle-hooks.sh failed: error executing command (from target //:.aspect_rules_js/node_modules/deasync#0.1.28/lc) bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/aspect_rules_js/npm/private/lifecycle/lifecycle-hooks.sh deasync ../../../external/npm__deasync__0.1.28/package ... (remaining 1 argument skipped)
/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/node-gyp-bin/node-gyp: line 5: 1211: command not found
node-gyp not found! Please upgrade your install of npm! You need at least 1.1.5 (I think) and preferably 1.1.30.
> deasync#0.1.28 install /private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/deasync#0.1.28/node_modules/deasync
> node ./build.js
===============================================================
Failure while running lifecycle hook for package 'deasync#0.1.28':
Script: 'install'
Command: `node ./build.js`
Stack trace:
spawn ENOENT
at ChildProcess.<anonymous> (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/external/aspect_rules_js/npm/private/lifecycle/min/index.min.js:1:91930)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
The final error suggests a bug with remix, but since it only occurs in the bazel sandbox I think it may be an issue that cuts across bazel and remix. The error returned is shown below:
The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new
Missing output for entry point
Error
at Object.onCompileFailure (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:180:13)
at Object.compile (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/remixCompiler.js:34:134)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/compiler/build.js:33:3)
at async Object.build (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/commands.js:175:3)
at async Object.run (/private/var/tmp/_bazel_emmanuel/f416ba8913b741927ac435783e3163e0/sandbox/darwin-sandbox/1566/execroot/fleet/bazel-out/darwin_arm64-fastbuild/bin/node_modules/.aspect_rules_js/#remix-run+dev#1.12.0_#remix-run+serve#1.12.0/node_modules/#remix-run/dev/dist/cli/run.js:449:7)
Building Remix app in production mode...
Target //examples/remix:build failed to build
I've tried to run it outside bazel and with pnpm (I added the override to the package.json for browserify-zlip#0.2.0, then I ran pnpm instal with --ignore-scripts flag) and it builds fine.
I'm not sure if this is a bug with remix or a bazel issue. Has anyone else experienced this? Or does anyone having a working version of remix with bazel as the build tool?
I've created a minified version of the repository in the state of the 3rd error https://github.com/noelenwenede/bbbazel. Start up instructions are in the readme file.

How come flutter build ios --obfuscate --split-debug-info= failed with warnings, but flutter build ios works?

Please know that flutter build ios works perfectly without any warning or error.
But when I do flutter build ios --obfuscate --split-debug-info=/_app/obfuscate
it failed with this error :
Building com.x.app for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: YSHDK23K
Running pod install...                                             18.9s
Running Xcode build...                                                  
                                                   
Xcode build done.                                           515.9s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
   /_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1462:38: warning:
    variable 'sum_left' may be uninitialized when used here [-Wconditional-uninitialized]
        const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
                                         ^~~~~~~~
   /_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1426:3: note: variable
    'sum_left' is declared here
      uint16x8_t sum_left;
      ^
   /_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1462:48: warning:
    variable 'sum_top' may be uninitialized when used here [-Wconditional-uninitialized]
        const uint16x8_t sum = vaddq_u16(sum_left, sum_top);
                                                   ^~~~~~~
   /_app/ios/Pods/libwebp/src/dsp/dec_neon.c:1425:3: note: variable
    'sum_top' is declared here
      uint16x8_t sum_top;
     
...... ======= <Warnings Truncated> ========= .......
    /Applications/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_image_compress-0.6.5+1/ios/Classes/SYP
    ictureMetadata/SYMetadataExif.m:9:9: warning: non-portable path to file '"SYMetadataExif.h"'; specified path differs in
    case from file name on disk [-Wnonportable-include-path]
    #import "SYMetadataEXIF.h"
            ^~~~~~~~~~~~~~~~~~
            "SYMetadataExif.h"
    1 warning generated.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
Encountered error while building for device.
I got an error from Stackoverflow thus cannot submit without truncating the warnings, thus I cut it off in the middle. If you need more of those warnings please ask me and I will send it to you..
What am I missing here? The app and all works fine even in release mode. It is only when I add the --obfuscate flag it is like this.
Finally I solved this problem. But the solution is tedious and I'm not sure if this is the best solution. But I think this is the robust solution:
Delete Flutter entirely from your computer
Reinstall flutter with the latest version.
In the ios folder of your project directory, delete "Podfile" file, "Podfile.lock" file, and "Pods" directory.
Do flutter clean in your project directory.
Then rerun the app as intended.
Then it works... at least for me.
Anyone else has other solution?
Clean all unwanted files,
run this command from a terminal
flutter clean && rm ios/Podfile ios/Podfile.lock pubspec.lock && rm -rf ios/Pods ios/Runner.xcworkspace

pypy3 dyld can not be found in homebrew

I got the following error when I use homebrew. Does anybody know how to fix the problem?
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
Referenced from: /usr/local/Cellar/pypy/7.1.1_1/libexec/lib/libpypy-c.dylib
Reason: image not found
Here is the output of brew doctor.
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Some installed formulae were deleted!
You should find replacements for the following formulae:
inchi
python#2
libmpc#0.8
pygtk
isl#0.11
f2c
indigo
mpfr#2
gmp#4
phantomjs
phantomjs
rdkit
casperjs
mumps
ecj
pygobject
isl#0.12
gcc#4.8
gcc#4.8
Warning: Calling a Formula#patches definition is deprecated! Use 'patch do' block calls instead.
Please report this issue to the docmunch/pdftk tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/docmunch/homebrew-pdftk/pdftk.rb:15
Warning: You have the following deprecated, official taps tapped:
Homebrew/homebrew-dupes
Homebrew/homebrew-fuse
Homebrew/homebrew-head-only
Homebrew/homebrew-versions
Homebrew/homebrew-x11
Untap them with `brew untap`.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
Warning: Putting non-prefixed coreutils in your path can cause gmp builds to fail.
Warning: Putting non-prefixed findutils in your path can cause python builds to fail.
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libgcc_ext.10.4.dylib
/usr/local/lib/libgcc_ext.10.5.dylib
/usr/local/lib/libgcc_s.10.4.dylib
/usr/local/lib/libgcc_s.10.5.dylib
/usr/local/lib/libgcc_s_x86_64.1.dylib
/usr/local/lib/libgfortran.2.0.0.dylib
/usr/local/lib/libgfortran.3.dylib
/usr/local/lib/libgomp.1.dylib
/usr/local/lib/libpocketsphinx.3.dylib
/usr/local/lib/libpostal.1.dylib
/usr/local/lib/libquadmath.0.dylib
/usr/local/lib/libsphinxad.3.dylib
/usr/local/lib/libsphinxbase.3.dylib
/usr/local/lib/libtcl8.6.dylib
/usr/local/lib/libtk8.6.dylib
/usr/local/lib/libwkhtmltox.0.12.1.dylib
/usr/local/lib/libwkhtmltox.0.12.2.dylib
/usr/local/lib/libwkhtmltox.0.12.4.dylib
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/fakemysql.h
/usr/local/include/fakepq.h
/usr/local/include/fakesql.h
/usr/local/include/itcl.h
/usr/local/include/itcl2TclOO.h
/usr/local/include/itclDecls.h
/usr/local/include/itclInt.h
/usr/local/include/itclIntDecls.h
/usr/local/include/itclMigrate2TclCore.h
/usr/local/include/itclTclIntStubsFcn.h
/usr/local/include/libpostal/libpostal.h
/usr/local/include/mysqlStubs.h
/usr/local/include/node/js_native_api.h
/usr/local/include/node/js_native_api_types.h
/usr/local/include/node/libplatform/libplatform-export.h
/usr/local/include/node/libplatform/libplatform.h
... /usr/local/include/tclPlatDecls.h
/usr/local/include/tclThread.h
/usr/local/include/tclTomMath.h
/usr/local/include/tclTomMathDecls.h
/usr/local/include/tdbc.h
/usr/local/include/tdbcDecls.h
/usr/local/include/tdbcInt.h
/usr/local/include/tk.h
/usr/local/include/tkDecls.h
/usr/local/include/tkPlatDecls.h
/usr/local/include/wkhtmltox/image.h
/usr/local/include/wkhtmltox/pdf.h
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libgfortran.la
/usr/local/lib/libgomp.la
/usr/local/lib/libpocketsphinx.la
/usr/local/lib/libpostal.la
/usr/local/lib/libquadmath.la
/usr/local/lib/libsphinxad.la
/usr/local/lib/libsphinxbase.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/libpostal.pc
/usr/local/lib/pkgconfig/pocketsphinx.pc
/usr/local/lib/pkgconfig/sphinxbase.pc
/usr/local/lib/pkgconfig/tcl.pc
/usr/local/lib/pkgconfig/tk.pc
Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected static libraries:
/usr/local/lib/libgfortran.a
/usr/local/lib/libgomp.a
/usr/local/lib/libpocketsphinx.a
/usr/local/lib/libpostal.a
/usr/local/lib/libquadmath.a
/usr/local/lib/libsphinxad.a
/usr/local/lib/libsphinxbase.a
/usr/local/lib/libtclstub8.6.a
/usr/local/lib/libtkstub8.6.a
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
inchi
mpich
ssed
python
libmpc#0.8
nss
isl#0.11
numpy
mpfr#2
gmp#4
poppler
nspr
scipy
gcc#4.8
Warning: Some installed formulae are not readable:
indigo: Unsupported special dependency :python
rdkit: Unsupported special dependency :python3
Warning: Your Xcode (10.3) is outdated.
Please update to Xcode 11.3.1 (or delete it).
Xcode can be updated from the App Store.
Warning: Broken symlinks were found. Remove them with `brew cleanup`:
/usr/local/share/man/man5/package-lock.json.5
/usr/local/share/man/man7/removing-npm.7
Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
brew install imlib2 libcaca opusfile
Run `brew missing` for more details.
This is a duplicate of issue 3229 on the PyPy issue tracker. It seems our buildbot is using a brew installed version of libffi. Until we solve this, you should be able to do brew install pypy3. Help from someone who can make the PyPy build look more like the CPython one (which apparently does not have this problem) are welcome.

":CFBundleIdentifier", Does Not Exist: ReactNative 0.58 on Mac / iOS

I am following the ReactNative tutorial for 0.58. I do everything it says to do and I am crashing after running react-native run-ios. I have seen this extremely similar SO question from 2016.
I attempted react-native upgrade and it recommended doing react-native-git-upgrade.This did nothing. Same problem.
The bit on running ./configure in the question above after cd-ing into glog did nothing. There was no configure script there. In the path NewStupidProject/node_modules/react-native/scripts there is a script called ios-configure-glog.sh. I run bash ios-configure-glog.sh and it says ios-configure-glog.sh: line 31: ./configure: No such file or directory.
I have also attempted setting Xcode to use the legacy build system. This did not fix the issue. I am restarting my laptop now to see if that makes any of these changes take effect. No luck. At the top it says:
Found Xcode project NewStupidProject.xcodeproj Building using
"xcodebuild -project NewStupidProject.xcodeproj -configuration Debug
-scheme NewStupidProject -destination id=854019D1-8EE7-4D13-87E1-385E6CAC21BE -derivedDataPath build" User
defaults from command line:
IDEDerivedDataPathOverride = /Users/me/NewStupidProject/ios/build
Prepare build
note: Using legacy build system
=== BUILD TARGET double-conversion OF PROJECT React WITH CONFIGURATION Debug ===
When I go into the home directory and run react-native --version the output is:
[NewStupidProject](master)$ react-native --version
react-native-cli: 2.0.1
react-native: 0.58.4
[NewStupidProject](master)$
My output after crashing is:
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/me/native_react_apps/NewStupidProject/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing
build/Build/Products/Debug-iphonesimulator/NewStupidProject.app An
error was encountered processing the command
(domain=NSPOSIXErrorDomain, code=22): Failed to install the requested
application The bundle identifier of the application could not be
determined. Ensure that the application's Info.plist contains a value
for CFBundleIdentifier. Print: Entry, ":CFBundleIdentifier", Does Not
Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier
build/Build/Products/Debug-iphonesimulator/NewStupidProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Error: Command failed: /usr/libexec/PlistBuddy -c
Print:CFBundleIdentifier
build/Build/Products/Debug-iphonesimulator/NewStupidProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
at checkExecSyncError (child_process.js:637:11)
at Object.execFileSync (child_process.js:655:13)
at Promise.then (/Users/me/native_react_apps/NewStupidProject/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)
How is it possible for the setup process to be this fraught with errors and this difficult?
WHY is this error message not in the Troubleshooting ReactNative setup?
HOW do I fix this? Is it possible to avoid this altogether in the future?
Other versioning info:
XCode: 10.1
Command Line Tools: 10.1
yarn: 0.27.5
watchman: 4.9.0
homebrew: 2.0.1
npm: 6.8.0
node: v11.9.0
macOS: 10.13.6
UPDATE:
I am trying to implement the solution in this issue in GitHub and I'm getting:
dyld: Library not loaded:
/usr/local/opt/readline/lib/libreadline.7.dylib Referenced from:
/usr/local/bin/awk Reason: image not found
./ios-install-third-party.sh: line 20: 24497 Broken pipe: 13
shasum -p "$cachedir/$file"
24498 Abort trap: 6 | awk -v hash="$hash" '{exit $1 != hash}' Incorrect hash: 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc
?/Users/me/.rncache/glog-0.3.5.tar.gz
UPDATE No. 2 I am trying to run the watchman watch-del-all command as recommended here to clear the cache for RN > 0.50 and the whole thing is hanging.
I tried modify the build system and it worked for me.
Detail:
Open your project workspace file in Xcode, and
File -> Workspace Settings -> Build system -> Legacy Build system

Error compiling Mosquitto 1.4

I have tried to compile Mosquitto on both Arch and CentOS 7, but everytime I get the same error. I want to test the Websocket feature.
This is the procedure I am using for CentOS:
yum group install "Development Tools"
yum install cmake openssl-devel cmake
yum install uuid-devel libxslt docbook5-style-xsl.noarch docbook-style-xsl.noarch
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets/
mkdir build;cd build
cmake ..
make
make install
git clone https://git.eclipse.org/r/mosquitto/org.eclipse.mosquitto
cd org.eclipse.mosquitto/
git checkout origin/1.4
vi config.mk
Change "WITH_WEBSOCKETS:=yes"
make
And this is where it dies on Arch and CentOS:
make[1]: Entering directory '/home/install/org.eclipse.mosquitto/src'
cc -Wall -ggdb -O2 -I. -I.. -I../lib -DVERSION="\"1.4\"" -DTIMESTAMP="\"2015-05-04 17:17:55+0200\"" -DWITH_BROKER -DWITH_TLS -DWITH_TLS_PSK -DWITH_UUID -DWITH_BRIDGE -DWITH_PERSISTENCE -DWITH_MEMORY_TRACKING -DWITH_SYS_TREE -DWITH_WEBSOCKETS -DWITH_EC -c mosquitto.c -o mosquitto.o
In file included from /usr/include/unistd.h:25:0,
from mosquitto.c:22:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
mosquitto.c: In function ‘main’:
mosquitto.c:275:101: error: expected expression before ‘,’ token
_mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s (build date %s) starting", VERSION, TIMESTAMP);
mosquitto.c:290:54: error: expected expression before ‘)’ token
snprintf(buf, 1024, "mosquitto version %s", VERSION);
mosquitto.c:368:88: error: expected expression before ‘)’ token
_mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s terminating", VERSION);
Makefile:15: recipe for target 'mosquitto.o' failed
make[1]: *** [mosquitto.o] Error 1
make[1]: Leaving directory '/home/install/org.eclipse.mosquitto/src'
Makefile:21: recipe for target 'mosquitto' failed
make: *** [mosquitto] Error 2
If someone can please point out what I am doing wrong or missing ?
As #hardillb says, the VERSION defines are the problem. If I add the line
#define VERSION
to mosquitto.c, then I can reproduce the error that you see, but also get a warning about redefining VERSION.
If I remove the definition of VERSION from config.mk, then I get an error about VERSION not being defined.
These both make sense.
What seems to be happening for you is that the compiler is ignoring the command line definition -DVERSION="\"1.4.1\"" and replacing it with -DVERSION=, or isn't parsing the string properly. This doesn't make sense.
Other people have managed to compile on Arch, and the CentOS7 repository has a binary version - but without websockets.
After some investigation, it appears as though there is a bug in recent libwebsockets code. This changeset introduces some changes that mean that libwebsockets is claiming the macro VERSION all for itself, which isn't very polite for a library. If you use a released version of libwebsockets you should not have any problem compiling.
Just out of interest have you tried building from the TGZ src bundle for Mosquitto 1.4.1 available here:
http://mosquitto.org/download/
The errors look to be something to do with expanding the passed in VERSION and TIMESTAMP values. It builds fine [with the exception of the docs] on Fedora 20 which shouldn't be that far from RHEL 7.0 (and from there to Centos 7).

Resources