Skip to content
This repository was archived by the owner on Oct 19, 2021. It is now read-only.

EPM cannot be built on solaris 11 #50

Closed
michaelrsweet opened this issue Feb 18, 2016 · 10 comments
Closed

EPM cannot be built on solaris 11 #50

michaelrsweet opened this issue Feb 18, 2016 · 10 comments
Assignees
Labels
Milestone

Comments

@michaelrsweet
Copy link
Owner

Version: 4.2
Original reporter: jonesliu

I installed EPM 4.2 successfully on solaris 10
My software can be packaged via EPM and it can be installed correctly on solaris 10

There are two issues on solaris 11:

  1. My software can�t be installed to the expected directory on solaris 11
    For example: My software is located on "/usr/jones", After installing my software, the software is installed to the directory "/usr/jones/opt/sps" on the solaris 11. But it can be installed to the directory �/opt/sps� correctly on solaris 10.
    Actually, I set the path to absolute path �/opt/sps� not the relative path �opt/sps� in the *.plist. I have no idea why the software is installed to the relative path.

  2. The EPM can�t be built on solaris 11
    I want install the EPM on solaris 11, But it will prompt error information after entering �make� command.
    The error info as below:
    Dist.c:61:error:conflicting types for �gethostname�
    Make:Fatal error: Command failed for target �dist.o�

I try different gcc version �gcc 3.6� and �gcc 4.8�, I also try EPM 4.3 version, but all failed.

@michaelrsweet
Copy link
Owner Author

Original reporter: jonesliu

EPM can't be built

@michaelrsweet
Copy link
Owner Author

michaelrsweet commented Feb 18, 2016

Original reporter: jonesliu

I installed EPM 4.2 successfully on solaris 10
My software can be packaged via EPM and it can be installed correctly on solaris 10

There are two issues on solaris 11:

  1. For example: My software can�t be installed to the expected directory on solaris 11
    My software is located on "/usr/jones", After installing my software, the software is installed to the directory "/usr/jones/opt/sps" on the solaris 11. But it can be installed to the directory �/opt/sps� correctly on solaris 10.
    Actually, I set the path to absolute path �/opt/sps� not the relative path �opt/sps� in the *.list. I have no idea why the software is installed to the relative path.
    In the *.list, I set the path as below:
$installdir=/opt/sps
$FACE=SPS
$SERVICE=SPSService
$srcdir=.
$SPSU=root
$SPSUGP=sys

%system solaris
f 0755 $SPSU $SPSUGP $installdir/$FACE $srcdir/$FACE
%system all
f 0755 $SPSU $SPSUGP $installdir/$SERVICE $srcdir/$SERVICE
  1. The EPM can�t be built on solaris 11
    I want install the EPM on solaris 11, But it will prompt error information after entering �make� command.
    The error info as below:
Dist.c:61:error:conflicting types for �gethostname�
Make:Fatal error: Command failed for target �dist.o�

I try different gcc version �gcc 3.6� and �gcc 4.8�, I also try EPM 4.3 version, but all failed.

@michaelrsweet
Copy link
Owner Author

Original reporter: jonesliu

For the issue top 1:
When I install my software on solairs 11, it prompt:
tar: Removing leading '/' from '/opt/sps/**'

I think this is the reason why my software is installed to relative path 'opt/sps'

please refer to attachment "install.png"

@michaelrsweet
Copy link
Owner Author

michaelrsweet commented Feb 18, 2016

Original reporter: jonesliu

In the *.list, I set the path as below:

$installdir=/opt/sps
$FACE=SPS
$SERVICE=SPSService
$srcdir=.
$SPSU=root
$SPSUGP=sys

%system solaris
f 0755 $SPSU $SPSUGP $installdir/$FACE $srcdir/$FACE
%system all
f 0755 $SPSU $SPSUGP $installdir/$SERVICE $srcdir/$SERVICE

@michaelrsweet
Copy link
Owner Author

michaelrsweet commented Feb 18, 2016

Original reporter: jonesliu

some peple say the tar command should add the "-P" argument to force tar to take in absolute pathnames

but I check the my *.install, I found it use "P" as aragument already:

# Determine correct extract options for the tar command...
if test `uname` = Darwin; then
	ac_tar="tar -xpPf"
else if test "`tar --help 2>&1 | grep GNU`" = ""; then
	ac_tar="tar -xpf"
else
	ac_tar="tar -xpPf"
fi fi

@michaelrsweet
Copy link
Owner Author

michaelrsweet commented Feb 18, 2016

Original reporter: jonesliu

hi all:
I try to modify the *.install as below:

# Determine correct extract options for the tar command...
if test `uname` = Darwin; then
        ac_tar="tar -xpPf"
else if test "`tar --help 2>&1 | grep GNU`" = ""; then
        ac_tar="tar -xpPf"
else
        ac_tar="tar -xpPf"
fi fi

Now, the software can be installed to the /opt/sps path.

but I don't want to modify in the *.install, I want to modify in the original EPM document.

Can you tell me how to modify it in the original EPM document??

@michaelrsweet michaelrsweet added this to the Stable milestone Mar 3, 2017
@michaelrsweet michaelrsweet self-assigned this Mar 11, 2017
@michaelrsweet
Copy link
Owner Author

As near as I can tell from the LiveCD image, the existing script code should be working. Setting up a VM to test further...

@michaelrsweet
Copy link
Owner Author

Looking at the history, you were using EPM 4.2 but EPM 4.3 (current stable release) included a change for Solaris 11 to add /usr/gnu/bin to the path (commit 2c55071).

I've fixed the compilation problem, and will confirm that the test package can be built and installed on Solaris 11.

michaelrsweet added a commit that referenced this issue Oct 3, 2017
Optimize the tar check to use elif (supported by POSIX shells) rather than a
nested if.
@michaelrsweet
Copy link
Owner Author

[master 1cb73ec] Fix a build issue on Open Solaris 11 (Issue #50)

@michaelrsweet
Copy link
Owner Author

Verified on OpenSolaris 11.3.

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

No branches or pull requests

1 participant