{"action":"created","issue":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2418","repository_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf","labels_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2418/labels{/name}","comments_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2418/comments","events_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2418/events","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2418","id":89133006,"number":2418,"title":"OS X build error related to libwkhtmltox and get_version","user":{"login":"benmaher","id":3207044,"avatar_url":"https://avatars.githubusercontent.com/u/3207044?v=3","gravatar_id":"","url":"https://api.github.com/users/benmaher","html_url":"https://github.com/benmaher","followers_url":"https://api.github.com/users/benmaher/followers","following_url":"https://api.github.com/users/benmaher/following{/other_user}","gists_url":"https://api.github.com/users/benmaher/gists{/gist_id}","starred_url":"https://api.github.com/users/benmaher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benmaher/subscriptions","organizations_url":"https://api.github.com/users/benmaher/orgs","repos_url":"https://api.github.com/users/benmaher/repos","events_url":"https://api.github.com/users/benmaher/events{/privacy}","received_events_url":"https://api.github.com/users/benmaher/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/labels/Fixed","name":"Fixed","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/milestones/6","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/milestones/0.12.3","labels_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/milestones/6/labels","id":989260,"number":6,"title":"0.12.3","description":"","creator":{"login":"ashkulz","id":854352,"avatar_url":"https://avatars.githubusercontent.com/u/854352?v=3","gravatar_id":"","url":"https://api.github.com/users/ashkulz","html_url":"https://github.com/ashkulz","followers_url":"https://api.github.com/users/ashkulz/followers","following_url":"https://api.github.com/users/ashkulz/following{/other_user}","gists_url":"https://api.github.com/users/ashkulz/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkulz/subscriptions","organizations_url":"https://api.github.com/users/ashkulz/orgs","repos_url":"https://api.github.com/users/ashkulz/repos","events_url":"https://api.github.com/users/ashkulz/events{/privacy}","received_events_url":"https://api.github.com/users/ashkulz/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":20,"state":"closed","created_at":"2015-02-21T09:00:58Z","updated_at":"2016-04-14T08:45:38Z","due_on":null,"closed_at":"2016-04-14T08:44:57Z"},"comments":6,"created_at":"2015-06-17T21:39:06Z","updated_at":"2016-05-24T10:27:17Z","closed_at":"2015-06-30T14:10:29Z","body":"I'm unable to build from source for OS X. Given that this change occurred on Feb 17, 2015 and there hasn't been an OS X binary released since 0.12.2.1 I'm assuming that this is a new bug. I haven't found any open issues regarding this.\r\n\r\nhttps://github.com/wkhtmltopdf/wkhtmltopdf/commit/355217acae7b874f214e9e1df0fcbc083994c15b\r\n\r\n`error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: bin/libwkhtmltox.0.12.3.0.dylib (No such file or directory)`\r\n`install_name_tool -change /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/CoreText bin/libwkhtmltox.0.12.3.0.dylib`\r\n`command failed: exit code 256`\r\n\r\nTracing this, in `build.py` -> `def build_osx` -> `def get_version` returns a `simple_version` with 4 levels. This is used later when running `install_name_tool` which looks for `libwkhtmltox.0.12.3.0.dylib`. This file doesn't exist because when `qmake` generates the Makefile it is instructed to create `libwkhtmltox.0.12.3.dylib` and the following symlinks:\r\n\r\n`libwkhtmltox.0.12.dylib`\r\n`libwkhtmltox.0.dylib`\r\n`libwkhtmltox.dylib`\r\n\r\n`libwkhtmltox.0.12.3.0.dylib` is not created as symlink.\r\n\r\nI realize this is tied to `wkhtmltopdf/qt` though I'm creating an issue here as I don't know which code base should address it. I've dug into `wkhtmltopdf/qt` and found that `wkhtmltopdf/qt/qmake/generators/unix/unixmake2.cpp` appears to handle the creation of these symlinks. Given that the `Makefile` has `TARGET2 =`, this is the only section of code that creates it:\r\n\r\nIn `UnixMakefileGenerator::writeMakeParts`\r\n...\r\n\r\n        } else if(project->isEmpty(\"QMAKE_HPUX_SHLIB\")) {\r\n            t << \"TARGETD       = \" << escapeFilePath(var(\"TARGET_x.y.z\")) << endl;\r\n            t << \"TARGET0       = \" << escapeFilePath(var(\"TARGET_\")) << endl;\r\n            t << \"TARGET1       = \" << escapeFilePath(var(\"TARGET_x\")) << endl;\r\n            t << \"TARGET2       = \" << escapeFilePath(var(\"TARGET_x.y\")) << endl;\r\n\r\nThese `TARGET_` vars appear to be created in `UnixMakefileGenerator::init2` relying on `project` variables that store the version. This would also require modification to `wkhtmltopdf/qt/qmake/generators/mac/pbx_builder.cpp` to support a fourth level to the version.\r\n\r\nI've worked around this by changing `def get_version` -> `def make4digit` from\r\n\r\n    while ver.count('.') < 3:\r\n\r\nto\r\n\r\n    while ver.count('.') < 2:\r\n\r\nThe compile works now although I'm not entirely sure this is the best move as `make4digit` was added with the commit message \"This is required for embedding the version information in the installer.\" I don't have enough insight to know if my workaround breaks anything. Should `wkhtmltopdf/qt` be modified or is there a better solution?"},"comment":{"url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/comments/221228730","html_url":"https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2418#issuecomment-221228730","issue_url":"https://api.github.com/repos/wkhtmltopdf/wkhtmltopdf/issues/2418","id":221228730,"user":{"login":"ashkulz","id":854352,"avatar_url":"https://avatars.githubusercontent.com/u/854352?v=3","gravatar_id":"","url":"https://api.github.com/users/ashkulz","html_url":"https://github.com/ashkulz","followers_url":"https://api.github.com/users/ashkulz/followers","following_url":"https://api.github.com/users/ashkulz/following{/other_user}","gists_url":"https://api.github.com/users/ashkulz/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkulz/subscriptions","organizations_url":"https://api.github.com/users/ashkulz/orgs","repos_url":"https://api.github.com/users/ashkulz/repos","events_url":"https://api.github.com/users/ashkulz/events{/privacy}","received_events_url":"https://api.github.com/users/ashkulz/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T10:27:17Z","updated_at":"2016-05-24T10:27:17Z","body":"What are the files present in `bin/`?"}}
{"actor":{"display_login":"ashkulz"}}