-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Support Solaris (and also Joyent SmartOS) #10521
Comments
[email protected] commented:
|
[email protected] commented:
|
[email protected] commented:
|
[email protected] commented:
|
I'm trying to build phantomjs on solaris 11.1.
must be added in qplatformdefs.h and I didn't figure out how to remove unsupported -Wl,-O1 from linker flags, so I just hacked the
in g++-unix.conf). amd64 version if failing to build early, in qt/corelib:
i386 version is able to build qt basic components, but is crashing while building qtwebkit:
I tried to clone their repo (https://gitorious.org/+qtwebkit-developers/webkit/qtwebkit, as stated in README), but I had no luck at all while trying to build it - seems like they use some old configure.ac file - autogen.sh doesn't see my installed libtool and thus produces broken configure. Any ideas ? P.S. Can you clarify one thing for me - if I need phantomjs for my web-server (actually, for node.js integration) - and I have no X on my webserver, is there a way may be to build it without X ? I really feel like I don't need Qt at all. I thought 'headless' assumes 'no graphical toolkit'. |
By the way, this particular error can be fixed commenting out this 'yield' declaration, but then it crashes on:
And this seems unfixable regarding my skills. |
Seems like it can be easily fixed too, after that there's only one crash point which requires --std=c99. I have build the phantomjs, the binary is working. |
Just a note about fixing:
can be fixed by adding
in the last branch, which Solaris compiler seem to be falling into. This branch doesn't contain proper code and is marked as FIXME. So the whole piece should look like this:
|
"Hello world" script does work, the google rendering also works - http://tech.hq.norma.perm.ru/files/google.png (rendered on Solaris, with cyrillic locale). Fonts are ugly, but I think this can be fixed somehow, right ? |
Got it. Since qtwebkit uses default fontconfig, I made a couple of screenshots with TTF fonts enabled. First uses default rendering settings, second uses some tweaks like AA/hints. http://tech.hq.norma.perm.ru/files/google-fonts.png |
@drook Good news! Looking forward to seeing the patch. |
I'm not that good at patching; will a "raw solaris patch" be enough ? You know, a patch which will still require some manual intervention when building, and will also probably break other platforms, so someone will need to look at it and make if fit for the general codebase. I can also provide packaged binaries for Solaris 11.0 and 11.1 (x86). I could provide Solaris 10 x86 binaries also, but I think they will be compiler-dependant (I'm sure this won't build with the default 3.4.3, so it needs some modern gcc), when it concerns libgcc_s.so.1. |
@drook Well, just a patch which shows the modification you make will be a start. That way, every one else can have a look and ensure that it doesn't cause problems for other platforms. |
So.... Patch: Test pic (made with a phantomjs binary, compiled after patching, zero manual intervention): Comments:
should also fire on Linux too, since the gcc is the same:
So in this file I commented out the troubled line unconditionally. May be it's worth testing on other gcc versions. |
Looks like the patch is rather minimalistic. I'd give it a try on Linux and see if it still builds there. |
Hmm well I have the following - http://pastebin.com/E3jZSkAT. Build "works" but something is defo not right. |
More pain http://pastebin.com/DkSyvjT0 |
What Solaris is this ? So you just launch the binary and it crashes ? |
That works lovely for me - you built for 32bit I see. I'm using SmartOS here (Illumos deriv). @drook if you've got the time I wouldn't mind a quick Skype or IRC with you to clear some things up that I maybe doing wrong in my build? |
Yeah, I didn't manage to set the build architecture properly, and using CFLAGS only the build crashes somewhere in the assembler stuff (obviously because of the wrong arch). Since this is only a static binary I decided that 32-bit binary would be just fine for a start. Yeah, I will be glad to help - skype://tookie-lookie or irc://drook@RusNet. |
+1 on SmartOS. Watching this thread, would love phantomjs to build on SmartOS. We are running a bunch of Ubuntu instances just for phantomjs. Thanks for all the hard work! :) |
Did try to build native SmartOS 32-bit binary using the provided patch ? Without any additional CFLAGS/LDFLAGS in the environment. |
We run on 64bit OS images across the board. Would 32-bit binary work there? |
Well.. it does on native Solaris, don't know about SmartOS. |
Absolutely works for me (many thanks drook). I do want to build a 64 bit binary and put it into PKGSRC though and W. A. Khushil Dep - [email protected] - 07905 374 843 On 24 April 2013 08:48, drook [email protected] wrote:
|
32bit binary should work on SmartOS, but 64bit would be better (if possible). If you can't get it to compile 64bit I can dig up from environment variable settings that worked for a different 64bit compile, buried somewhere in our chef cookbooks. |
+1 for 64-bit SmartOS. |
I've just created a $25 bounty for this issue: https://www.bountysource.com/#issues/302363-support-solaris-and-also-joyent-smartos Specifically, I run into a problem when running "npm install" on SmartOS: npm http GET https://registry.npmjs.org/wordwrap npm ERR! System SunOS 5.11 |
It turned out I commented out the -grc option while I was waiting for my sysadmin to install it and forgot to uncomment it afterward. Now I can run phantomjs, but I'm getting System Bus errors on all but the most trivial of JavaScript files. I got a whole bunch of cast and widening warnings during both the QT and PhantomJS build. It seems the developers are assuming folks will be using Intel architecture, which is a lot more forgiving of this sort of thing than SPARC is. I'm abandoning my effort for now, but I hope this will serve as a warning in case others attempt this. |
I tried bundling the app with http://pkgsrc.joyent.com/packages/SmartOS/2013Q3/multiarch/All/ phantomjs-1.9.1.tgz , location mentioned before by @arlolra , in a SmartOS environment. And it ended on
Was I missing something? libfreetype.so.6 points 'different' architecture(x86) than used for building phantomjs (x64)? |
Looks so. You need to get somewhere or build yourself a 32-bit freetype library and put it in the linker path with crle (or whatever SmartOS uses to). However, "multiarch" may also mean it's supposed to build fine on x64 and you have problem somewhere else. |
The multiarch packages contain both 32-bit and 64-bit binaries, or just 32-bit ones (where 64-bit doesn't make sense, or doesn't work at all - as in the case here). If we managed to make phantomjs build 64-bit on SunOS, we would've obviously posted it here for upstream merge. The multiarch packages will only work within the multiarch VMs, or theoretically in a 32-bit one (if you don't care about the added 64-bit binaries). F.
|
@drook I'm currently working on a static build ok wkhtmltopdf on SmartOS 64-bit and I've got everything going except I'm seeing the exact same font issue that your seeing. You mentioned that you enabled TTF support for QtWebKit - what changes were involved in that? |
@davefinster Well, the fontconfig support is already enabled, you just need to configure the fontconfig itself - this means that you need to take a decent fontconfig config file (with all of the ugliness disabled) and add some common TTF fonts. Fonts can be taken from any Windows machine, for example; and the fontconfig can be taken from any Linux/Unix machine that has X enabled and running and which output you dislike the less. The whole process is covered widely in the Internet, take any howto you like. Something like google://ttf and antialised fonts on linux. For example you can take this how-to: http://www.freebsd.org/doc/handbook/x-fonts.html . Without this, you are probably seeing the picture rendered with defaults, and defaults are always ugly. |
@drook Thanks for the reply - ended up being the complete absence of fonts :) Managed to get past it and I've got a working wkhtmltopdf on 64-bit SmartOS without seg faults in part thanks to your patches, particularly the system malloc one. |
@davefinster Is there a version available somewhere that can be downloaded and compiled on SmartOS base64? I would appreciate if you could point me to the sources. |
@kigster For wkhtmltopdf, I put the static binary link here: https://groups.google.com/forum/#!topic/wkhtmltopdf-general/AIagbMp-FJw There is a link to the Github issue about SmartOs support, which has a link to a gist that shows my steps to compile Qt. |
Thanks, guys. I'm out for vacation this week, but will revisit next week and see if I can integrate your effort into the pkgsrc packages for both phantomjs and wkhtmltopdf, so that we can generate official 64bit SmartOS packages via pkgsrc. |
@mamash any updates on the 64bit SmartOS package? |
No, as soon as I saw the progress over at wkhtmltopdf, I knew they have no relevance in the case here, so 64bit SunOS package remains as broken as before - the JS engine fails to load up at all. Unfortunately I lack time to dig deep into this. It's obvious though that it's something phantomjs specific; I was able to make wkhtmltopdf packages available in the recent Joyent repositories (2014Q1, 2014Q2), both as 32- and 64-bit. So at least there's that. |
Is there any update for this case? Will phantomjs 2.0 support Solaris? |
I have been trying to build 64bitPhantomjs from trunk on SmartOS recently, and right now it just doesn't work. Qt5 needs some patching to build at all and the resulting phantomjs binary just segfaults when I invoke it. |
Here's a purely static 32bit binary built on SmartOS. I can keep maintaining this for coming 1.9.x releases too. Wonder if we can have this included as a download option on the official site. |
mamash- do you have up to date build instructions for 1.9.x? What dependencies must be installed, and does the PhantomJS source need to be patched as discussed above? I appreciate the help! |
Joseph, please have a look at the pkgsrc recipe here: https://github.com/joyent/pkgsrc-wip/tree/master/phantomjs as that's how we build the package. The static version is slightly different (not by much): https://github.com/joyent/pkgsrc-joyent/tree/master/phantomjs-static It's full of pkgsrc mark-up, the dependencies and patches can be inspected clearly though. |
Has anyone figured out the issue with compiling on 64bit SmartOS images? |
I am trying to compile phantomjs 1.9.2 from source. When I start building it, I encounter missing header files errors. eg: wayland-client.h etc., Can any one point me to complete bundle of phantomjs 1.9.2 source code where all the header files are in place. |
Due to limited resources, I think realistically we will never support other operating systems beyond the usual consumer ones (Windows, macOS, Linux) unless there is a significant help coming our way. We will close this for now. If there is a new update on the subject, let's have it reopened again. |
[email protected] commented:
Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #521.
🌟 5 people had starred this issue at the time of migration.
The text was updated successfully, but these errors were encountered: