{"action":"created","issue":{"url":"https://api.github.com/repos/google/bazel/issues/189","labels_url":"https://api.github.com/repos/google/bazel/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/google/bazel/issues/189/comments","events_url":"https://api.github.com/repos/google/bazel/issues/189/events","html_url":"https://github.com/google/bazel/issues/189","id":76151884,"number":189,"title":"stat64/lstat64 deprecation compiler warnings on Darwin","user":{"login":"davidzchen","id":5283042,"avatar_url":"https://avatars.githubusercontent.com/u/5283042?v=3","gravatar_id":"","url":"https://api.github.com/users/davidzchen","html_url":"https://github.com/davidzchen","followers_url":"https://api.github.com/users/davidzchen/followers","following_url":"https://api.github.com/users/davidzchen/following{/other_user}","gists_url":"https://api.github.com/users/davidzchen/gists{/gist_id}","starred_url":"https://api.github.com/users/davidzchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidzchen/subscriptions","organizations_url":"https://api.github.com/users/davidzchen/orgs","repos_url":"https://api.github.com/users/davidzchen/repos","events_url":"https://api.github.com/users/davidzchen/events{/privacy}","received_events_url":"https://api.github.com/users/davidzchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-13T22:50:12Z","updated_at":"2015-05-14T14:22:06Z","closed_at":null,"body":"Commit 73ad1482a1d99b9acd14f4545ff11671d87ec4e1 switched the use of stat/lstat to stat64/lstat64. However, it seems that stat64/lstat64 is deprecated on Darwin since OS X 10.6 and is now raising the following compiler warnings:\r\n\r\n```\r\n❯❯❯ ./compile.sh\r\nCompiling Java stubs for protocol buffers...\r\nCompiling Bazel Java code...\r\nExtracting helper classes for Bazel Java...\r\nCreating libblaze.jar...\r\nCompiling SingleJar tool code...\r\nExtracting helper classes for SingleJar tool...\r\nCreating SingleJar_deploy.jar...\r\nCompiling JavaBuilder tool code...\r\nExtracting helper classes for JavaBuilder tool...\r\nCreating JavaBuilder_deploy.jar...\r\nCompiling client .cc files...\r\nLinking client...\r\nCompiling ijar .cc files...\r\nLinking ijar...\r\nCompiling JNI libraries...\r\nsrc/main/native/unix_jni.cc:417:36: warning: 'stat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n  return ::StatCommon(env, path, ::stat64, true);\r\n                                   ^\r\n/usr/include/sys/stat.h:391:5: note: 'stat64' has been explicitly marked deprecated here\r\nint     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\nsrc/main/native/unix_jni.cc:430:36: warning: 'lstat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n  return ::StatCommon(env, path, ::lstat64, true);\r\n                                   ^\r\n/usr/include/sys/stat.h:390:5: note: 'lstat64' has been explicitly marked deprecated here\r\nint     lstat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\nsrc/main/native/unix_jni.cc:442:36: warning: 'stat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n  return ::StatCommon(env, path, ::stat64, false);\r\n                                   ^\r\n/usr/include/sys/stat.h:391:5: note: 'stat64' has been explicitly marked deprecated here\r\nint     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\nsrc/main/native/unix_jni.cc:454:36: warning: 'lstat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n  return ::StatCommon(env, path, ::lstat64, false);\r\n                                   ^\r\n/usr/include/sys/stat.h:390:5: note: 'lstat64' has been explicitly marked deprecated here\r\nint     lstat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\n4 warnings generated.\r\nsrc/main/native/unix_jni_darwin.cc:53:12: warning: 'stat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n    return stat64(name, statbuf);\r\n           ^\r\n/usr/include/sys/stat.h:391:5: note: 'stat64' has been explicitly marked deprecated here\r\nint     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\nsrc/main/native/unix_jni_darwin.cc:71:11: warning: 'stat64' is deprecated: first deprecated in OS X 10.6 [-Wdeprecated-declarations]\r\n  int r = stat64(newpath, statbuf);\r\n          ^\r\n/usr/include/sys/stat.h:391:5: note: 'stat64' has been explicitly marked deprecated here\r\nint     stat64(const char *, struct stat64 *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_6,__IPHONE_NA,__IPHONE_NA);\r\n        ^\r\n2 warnings generated.\r\nLinking libunix.dylib...\r\nCompiling build-runfiles...\r\nCompiling process-wrapper...\r\nCreating Bazel self-extracting archive...\r\nCreating objc helper tools...\r\nCompiling actoolzip code...\r\nExtracting helper classes for actoolzip...\r\nCreating precomp_actoolzip_deploy.jar...\r\nCompiling ibtoolzip code...\r\nExtracting helper classes for ibtoolzip...\r\nCreating precomp_ibtoolzip_deploy.jar...\r\nCompiling momczip code...\r\nExtracting helper classes for momczip...\r\nCreating precomp_momczip_deploy.jar...\r\nCompiling bundlemerge code...\r\nExtracting helper classes for bundlemerge...\r\nCreating precomp_bundlemerge_deploy.jar...\r\nCompiling plmerge code...\r\nExtracting helper classes for plmerge...\r\nCreating precomp_plmerge_deploy.jar...\r\nCompiling xcodegen code...\r\nExtracting helper classes for xcodegen...\r\nCreating precomp_xcodegen_deploy.jar...\r\nBuild successful! Binary is here: /Users/dzc/Projects/bazel/output/bazel\r\n```"},"comment":{"url":"https://api.github.com/repos/google/bazel/issues/comments/102049705","html_url":"https://github.com/google/bazel/issues/189#issuecomment-102049705","issue_url":"https://api.github.com/repos/google/bazel/issues/189","id":102049705,"user":{"login":"kchodorow","id":17042,"avatar_url":"https://avatars.githubusercontent.com/u/17042?v=3","gravatar_id":"","url":"https://api.github.com/users/kchodorow","html_url":"https://github.com/kchodorow","followers_url":"https://api.github.com/users/kchodorow/followers","following_url":"https://api.github.com/users/kchodorow/following{/other_user}","gists_url":"https://api.github.com/users/kchodorow/gists{/gist_id}","starred_url":"https://api.github.com/users/kchodorow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kchodorow/subscriptions","organizations_url":"https://api.github.com/users/kchodorow/orgs","repos_url":"https://api.github.com/users/kchodorow/repos","events_url":"https://api.github.com/users/kchodorow/events{/privacy}","received_events_url":"https://api.github.com/users/kchodorow/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T14:22:06Z","updated_at":"2015-05-14T14:22:06Z","body":"Yeah, I think we're just going to switch back to using stat and casting the output so it works on 32-bit machines.  Sorry about the noise."}}