Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartOS: Update to package database to 2014Q4 #222

Closed
jbergstroem opened this issue Oct 15, 2015 · 15 comments
Closed

SmartOS: Update to package database to 2014Q4 #222

jbergstroem opened this issue Oct 15, 2015 · 15 comments

Comments

@jbergstroem
Copy link
Member

I'd like to bump our smartos machines from 2014Q3 to 2014Q4 and explore updating gcc (4.7 -> 4.8) and binutils.

We are currently using these machines for both testing and release builds with gcc49. There's been suggestions in issues that the gcc48 toolchain might give us greater compatibility with solaris 11.2 and similar, which also would be explored as part of this bump.

Refs: nodejs/node#1967, nodejs/node#3349, nodejs/node#3179.

@misterdjules
Copy link
Contributor

@jbergstroem Actually, after further discussions with @jperkin, here's my current position on using g++4.8 to build Solaris binaries on our SmartOS machines: nodejs/node#3349 (comment). TL;DR: using gcc/g++ 4.8 would actually break more users, and maybe nodejs/node#3391 is a better path forward.

However, upgrading to pkgsrc 2014Q4 might fix another build issue with debug builds. See nodejs/node#1967 and specifically nodejs/node#1967 (comment).

@jbergstroem
Copy link
Member Author

Since #3391 seems to be stalling somewhat I'll proceed with getting us to 4.8 and see if we can improve the current situation. If we end up flagging 4.7 as safe we'll just revisit.

@misterdjules
Copy link
Contributor

@jbergstroem I don't t think building node releases with the g++4.8 package present in SmartOS' pkgsrc repository is a good idea, for the following reason that I mentioned in a previous comment:

It would be possible to upgrade build machines to a pkgsrc version that provides gcc/g++ 4.8 and build sunos binaries with this toolchain. Unfortunately, that means node would be dynamically linked to a C++ runtime with a path that is not the default path (/opt/local/gcc48/x86_64-sun-solaris2.11/lib/libstdc++.so.6.0.19). Thus, any user who would want to run node on sunos would need to install that dynamic library at the same path by install the optional gcc-4.8 package on SmartOS.

However, as I mentioned before, using the binutils from the 2014Q4 pkgsrc repository would probably fix the issue with objdump crashing for debug builds.

@jbergstroem
Copy link
Member Author

@misterdjules I just updated the 32-bit machine to 2014Q4 but binutils still seems broken. doing a clean build now to verify. currently building with 4.8, but will try 4.9 next.

@jbergstroem
Copy link
Member Author

@misterdjules for me gcc48 installed itself as default instead of gcc49. Is there some magic regarding how smartos handles gcc installs?

@misterdjules
Copy link
Contributor

@jbergstroem What do you mean by "installed itself as default"? Also, what image did you use to create the virtual machine, and what pkgsrc version are you using?

@jbergstroem
Copy link
Member Author

  1. this is iojs-smartos-32-1
  2. changed package source from 2014Q3 to 2014Q4, having gcc47 and gcc49 installed (/usr/local/bin/gcc was gcc49)
  3. updated all packages
  4. no longer any default gcc (living in /usr/local/bin)
  5. installing gcc48 takes above place (/usr/local/bin) whereas gcc49 now lives in /opt/local/gcc49/.

@chorrell
Copy link

Hi,

What does this show?

cat /etc/product

That should show what image iojs-smartos-32-1 is based on.

Upgrading pkgsrc to a new release can be tricky and just changing the source from 2014Q3 to 2014Q4 might not be enough.

For pkgsrc, all packages are installed under /opt/local so gcc will be installed in /opt/local/bin/. Don't rely on gcc being in /usr/local/. This is probably one of the most annoying quirks of SmartOS that people have to deal with...

Both gcc 4.8 and gcc 4.9 should be available in pkgsrc 2014Q4, so to install gcc 4.9 this should work:

pkgin install gcc49

To be honest, I think it would be a lot easier if we just got a replacement for iojs-smartos-32-1 based on a base-32-lts 14.4.2 image. I can help with that :)

@jperkin
Copy link

jperkin commented Oct 23, 2015

All gcc versions are prefixed into /opt/local/gcc<version>, e.g. /opt/local/gcc49, and then there are pkg_alternatives(8) links from /opt/local/bin, however we haven't added the necessary alternatives file for gcc49 yet which is why there is no /opt/local/bin/gcc symlink. This will be fixed for 2015Q4.

@chorrell
Copy link

Ah, ok. So if gcc47 was previously installed there should still be a /opt/local/bin/gcc wrapper script there pointing to /opt/local/bin/gcc47.

So you should be able to remove the /opt/local/bin/gcc wrapper script and then add a symlink for /opt/local/bin/gcc -> /opt/local/bin/gcc49

@jbergstroem
Copy link
Member Author

Looks like all I have to do is modify /opt/local/libdata/pkg_alternatives/opt/local/bin/gcc. Changed to be consistent with our 64-bit CI machine, but I'd still like to explore using gcc48.

For the record, we previously had gcc47 and gcc49 installed and after switching to 2014Q4 I installed gcc48 as well.

I've done a few base/package upgrades on SmartOS before, this was less painful than "usual".

Finally, /etc/product: base 14.3.0

@misterdjules
Copy link
Contributor

@jbergstroem What are we trying to achieve with building binaries on SmartOS with gcc-4.8?

@jbergstroem
Copy link
Member Author

@misterdjules I'm under the impression that binaries would work on solaris 11.2. I'm currently not pursuing this (esp since we're using these vm's do cut releases).

@misterdjules
Copy link
Contributor

See https://gist.github.com/misterdjules/eae9ec70dc1d91fb8dd1 for more details about what's going on with SmartOS binaries.

@jbergstroem
Copy link
Member Author

going to close this. We won't update any repos, rather reprovision - but the report from @misterdjules above is highly relevant. What we needs to be done here is open a new issue to outline the way forward -- most likely creating new release binaries for smartos and finding resources for baking proper releases on solaris that would replace the current builders (sunos).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants