pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't bootstrap pkgsrc on Solaris 10



Hi,
I changed _OPSYS_SUPPORTS_SSP to "no" in mk/platform/SunOS.mk. ( one of my goal was to use pkgsrc instead of opencsw so installing gcc from opencsw to compile pkgsrc was kind of out of the equation )

Good news ! Bootstrap worked :

...
Hopefully everything is now complete.
Thank you for using pkgsrc!

===========================================================================

===> bootstrap started: Sat Jul  1 14:45:58 EDT 2017
===> bootstrap ended:   Sat Jul  1 15:30:06 EDT 2017

I copied /usr/pkgsrc/bootstrap/work/mk.conf.example to /usr/pkg/etc/mk.conf. However, I still have another issue. Not sure it's gcc related though. When I try to compile anything I get an error : 

ERROR: This package has set PKG_FAIL_REASON:
ERROR: Circular dependency detected
*** Error code 255

Stop.
bmake[3]: stopped in /usr/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
bmake[2]: stopped in /usr/pkgsrc/lang/gcc2
*** Error code 1

Stop.
bmake[1]: stopped in /usr/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/sysutils/lsof

I didn't see anything wrong in my mk.conf :

# Example /usr/pkg/etc/mk.conf file produced by bootstrap-pkgsrc
# Sat Jul  1 14:46:00 EDT 2017

.ifdef BSD_PKG_MK       # begin pkgsrc settings

ABI=                    64
PKGSRC_COMPILER=        gcc
GCCBASE=                /usr/sfw

PKG_DBDIR=              /usr/pkg/pkgdb
LOCALBASE=              /usr/pkg
VARBASE=                /var
PKG_TOOLS_BIN=          /usr/pkg/sbin
PKGINFODIR=             info
PKGMANDIR=              man

TOOLS_PLATFORM.install?=        /usr/pkg/bin/bsdinstall
TOOLS_PLATFORM.awk?=            /usr/pkg/bin/nawk
TOOLS_PLATFORM.sed?=            /usr/pkg/bin/nbsed
TOOLS_PLATFORM.sh?=             /usr/bin/bash
CFLAGS+=                -O2
DBG=                    # prevent DBG from adding default optimizer flags

.endif                  # end pkgsrc settings


Any suggestion ?

On Mon, Sep 11, 2017 at 3:05 AM, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
* On 2017-09-11 at 06:50 BST, Julien Savard wrote:

> It seems to be related to an unsupported option ( -fstack-protector ).
> gcc version i'm using is 3.4.3.
>
> Questions are :
>
>    1. Is this version of gcc (3.4.3) below minimum supported version ?

In general we don't have a minimum supported version, but in reality
that compiler is so old that you are going to run into issues
compiling packages, and there's no chance of building any packages
which require newer C++ standards.

>    2. If not below minimum, how can I make sure "-fstack-protector" not
>    used ?

It's being set by the

  _OPSYS_SUPPORTS_SSP=  yes

line in mk/platform/SunOS.mk - if you comment that out it should work.
What I'll do is add a compiler version check in that file so that SSP
isn't enabled if you are using such an old compiler, so at least you
should be able to bootstrap out of the box.

>    3. If below, which gcc version should I use ?

I'd suggest grabbing the GCC 4.9.2 package from opencsw.org and using
that to bootstrap, it'll be able to build pretty much every package
available.

Cheers,

--
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com



Home | Main Index | Thread Index | Old Index