Error when deploying Swift Application On Bluemix error: hidden symbol Foundation Operations - swift

I am trying to deploy an application on BlueMix. I can run the application locally on my computer, but cannot deploy it on BlueMix.
I believe the error is being caused by some Library or function under a library that is missing. Looking at the trace it is probably Foundation.OperationsDispatch.
How can I include the missing library or fix the above problem.
The error log is the following:
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
swift-build: error: exit(1): /tmp/cache/swift-3.0/swift-3.0-RELEASE-ubuntu14.04/usr/bin/swift-build-tool -f /tmp/staged/app/.build/release.yaml
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
/usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
Staging failed: Buildpack compilation step failed

This is a bug in Swift on Linux that was fixed by the following commit:
https://github.com/apple/swift/commit/fd61338444ac42d8715fd9e637b238e035f17f8d
Unfortunately that didn't make Swift 3.0 GA, but it should be in the latest Swift 3.0.1 Preview.

Does your application subclass Operation?
The linker errors look very similar to those in https://bugs.swift.org/browse/SR-2170. There is a known problem with Swift 3.0 on Linux which prevents subclassing of open classes defined in Foundation because the Foundation library is not being generated with the proper linker visibility for internal members of open classes.

Related

after buildind lammps when i run the executable this problem is shown

after completion of installation when running the executable this error is showing
Local host: csehpc
Local device: mlx4_0
./lmp: symbol lookup error: ./lmp: undefined symbol: _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm

Building a statically linked executable with Swift on Ubuntu

I'm trying to build an statically linked executable from a swift source on Ubuntu.
Calling
swift build -Xswiftc -static-stdlib
as suggested in Compile Swift script with static Swift core library
returns this error:
/usr/bin/ld.gold: error: cannot find -lFoundation
Some educated guesses:
Researching this hasn't led me very far, I know it means the library can't be found. Maybe it isn't in the compiler's path ?
Full error message:
user#user-VirtualBox:/path/to/project$ swift build -Xswiftc -static-stdlib
Compile Swift Module 'projectName' (4 sources)
Linking ./.build/debug/projectName
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/usr/bin/ld.gold: error: cannot find -lFoundation
/path/to/project/Sources/SomeClass_1.swift:67: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_1.swift:67: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_1.swift:68: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_1.swift:69: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/SomeClass_1.swift:72: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_1.swift:76: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_1.swift:76: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_2.swift:73: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_2.swift:73: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_2.swift:74: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_2.swift:75: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/SomeClass_2.swift:78: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_2.swift:82: error: undefined reference to '_TMaC10Foundation8NSString'
/path/to/project/Sources/SomeClass_2.swift:82: error: undefined reference to '_TFC10Foundation8NSStringCfT13stringLiteralVs12StaticString_S0_'
/path/to/project/Sources/SomeClass_3.swift:106: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/SomeClass_3.swift:106: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/SomeClass_3.swift:107: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/SomeClass_3.swift:107: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/SomeClass_3.swift:108: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
/path/to/project/Sources/main.swift:24: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:24: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:51: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:51: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:99: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:99: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:112: error: undefined reference to '_TMaC10Foundation12NSDictionary'
/path/to/project/Sources/main.swift:112: error: undefined reference to '_TFC10Foundation12NSDictionaryCft17dictionaryLiteralGSaTP_P____S0_'
/path/to/project/Sources/main.swift:167: error: undefined reference to '_TMaC10Foundation17JSONSerialization'
/path/to/project/Sources/main.swift:167: error: undefined reference to '_TFVC10Foundation17JSONSerialization14WritingOptionsau13prettyPrintedS1_'
/path/to/project/Sources/main.swift:168: error: undefined reference to '_TFVE10FoundationSS8Encodingau4utf8S0_'
/path/to/project/Sources/main.swift:168: error: undefined reference to '_TFC10Foundation8NSStringCfT4dataVS_4Data8encodingSu_GSqS0__'
/path/to/project/Sources/main.swift:169: error: undefined reference to '_TWPC10Foundation8NSObjects9EquatableS_'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /path/to/swift-3.0.2-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /path/to/project/.build/debug.yaml
The problem is that Foundation is not available as static library. There is an open bug for this:
https://bugs.swift.org/browse/SR-2205
You might be able to work around this problem if you could build a static Foundation lib, e.g. as part of building Swift from source.

VS ERROR: libconfig.obj : error LNK2019: unresolved external symbol _S_ISDIR referenced in function _config_read_file

Download libconfig from http://www.hyperrealm.com/libconfig/libconfig_manual.html.
But there is error on windows.
libconfig.obj : error LNK2019: unresolved external symbol _S_ISDIR referenced in function _config_read_file
S_ISDIR is defined in ,which is in linux system.so, if use it in function _config_read_file", you should define S_ISDIR in libconfig like this.
#define S_ISDIR(m) (((m) & 0170000) == (0040000))

AOSP building error: symbol not defined

I'm trying to build the cornerstone based on AOSP 4.3_r2.2. I got a lot of errors during the building like these:
frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1244: error: Symbol 'backspace' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1250: error: Symbol 'carrier' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:130: error: Symbol 'dangerous_perms_list' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1253: error: Symbol 'emergencyCallButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1254: error: Symbol 'faceLockAreaView' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1256: error: Symbol 'forgotPatternButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1258: error: Symbol 'headerText' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1260: error: Symbol 'instructions' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1263: error: Symbol 'lockPattern' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:131: error: Symbol 'non_dangerous_perms_list' declared with <java-symbol> not defined
...
make: *** [out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file `out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'
make: *** Waiting for unfinished jobs....
I searched here and found this issue. So I know this could be missing the symbol definition problem. But when I look at the public.xml, I see they belong to different types like these:
<java-symbol type="bool" name="config_bluetooth_sco_off_call" />
<java-symbol type="bool" name="config_enableDreams" />
<java-symbol type="drawable" name="ic_suggestions_add" />
<java-symbol type="drawable" name="ic_suggestions_delete" />
<java-symbol type="id" name="backspace" />
<java-symbol type="id" name="carrier" />
<java-symbol type="id" name="dangerous_perms_list" />
...
I also found there's a script file at frameworks/base/core/res/MakeJavaSymbols.sed, it says the command
make framework 2>&1 | sed -n -f MakeJavaSymbols.sed | sort -u
can be used to generate the missing resources. I searched a lot, all I found just to run this command, and it'll output the missing parts. But I ran it, nothing happened. So my question is where and how should I add these missing symbols? There are hundreds of them, do I need to add them manually? Did I missed something? Since I'm new in AOSP framework, so please help.
Finally resolved the problem, by did these:
1. Removed the symbol definition from public.xml;
2. Replaced android.view.Surface with android.view.SurfaceControl, and WindowManagerService.DEFAULT_DIM_DURATION with WindowAnimator.DEFAULT_DIM_DURATION.
After that, I compile it succeed, and it can be run, although there still have some problems.

how can I fix the error with making mtree

Hello I'm new to this and I don't understand, what's going on.
I need mtree for my iPhone and got an error.
And this is what I get:
In file included from compare.c:62:
vis.h:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
In file included from compare.c:65:
extern.h:52: warning: redundant redeclaration of ‘compare’
extern.h:40: warning: previous declaration of ‘compare’ was here
extern.h:59: warning: redundant redeclaration of ‘getmode’
/usr/include/unistd.h:700: warning: previous declaration of ‘getmode’ was here
extern.h:60: warning: redundant redeclaration of ‘setmode’
/usr/include/unistd.h:736: warning: previous declaration of ‘setmode’ was here
compare.c: In function ‘compare’:
compare.c:186: error: ‘struct stat’ has no member named ‘st_mtim’
compare.c:187: error: ‘struct stat’ has no member named ‘st_mtim’
compare.c:192: error: ‘struct stat’ has no member named ‘st_mtim’
make[1]: *** [compare.o] Error 1
make: *** [all] Error 2
The full message is at http://pastebin.com/rVUfVP75
compare.c:186: error: ‘struct stat’ has no member named ‘st_mtim’
It should be st_mtime. It looks like a typo.
The structure definition is here:
http://pubs.opengroup.org/onlinepubs/007908799/xsh/sysstat.h.html