* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
@ 2016-02-17 10:41 Matthew Shyu
2016-02-17 15:02 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Matthew Shyu @ 2016-02-17 10:41 UTC (permalink / raw)
To: buildroot
From: Matthew Shyu <matthew.shyu@amlogic.com>
The Configure script in openssl takes install_prefix from env by default
$install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, the INSTALL_PREFIX points to *TARGET* folder instead of
*HOST* folder.
This is fixed by intentionally setting install_prefix to blank.
Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
---
package/openssl/openssl.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index b7498a7..c35e93f 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS
$(HOST_CONFIGURE_OPTS) \
./config \
--prefix=$(HOST_DIR)/usr \
+ --install_prefix= \
--openssldir=$(HOST_DIR)/etc/ssl \
--libdir=/lib \
shared \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
2016-02-17 10:41 [Buildroot] [PATCH 1/1] fix host-openssl binary installation Matthew Shyu
@ 2016-02-17 15:02 ` Peter Korsgaard
2016-02-18 1:05 ` matthew.amlogic shyu
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-02-17 15:02 UTC (permalink / raw)
To: buildroot
>>>>> "Matthew" == Matthew Shyu <matthew.shyu.amlogic@gmail.com> writes:
> From: Matthew Shyu <matthew.shyu@amlogic.com>
> The Configure script in openssl takes install_prefix from env by default
> $install_prefix= "$ENV{'INSTALL_PREFIX'}"
> However, the INSTALL_PREFIX points to *TARGET* folder instead of
> *HOST* folder.
> This is fixed by intentionally setting install_prefix to blank.
Sorry, I'm not following you here. Do you mean that you have exported
INSTALL_PREFIX=<something> in your environment outside Buildroot? We do
indeed pass INSTALL_PREFIX to make install when we install the target
version to staging/target, but I don't see the relation to the host
variant?
> Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com>
> ---
> package/openssl/openssl.mk | 1 +
> 1 file changed, 1 insertion(+)
> diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
> index b7498a7..c35e93f 100644
> --- a/package/openssl/openssl.mk
> +++ b/package/openssl/openssl.mk
> @@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS
> $(HOST_CONFIGURE_OPTS) \
> ./config \
> --prefix=$(HOST_DIR)/usr \
> + --install_prefix= \
> --openssldir=$(HOST_DIR)/etc/ssl \
> --libdir=/lib \
> shared \
> --
> 1.7.9.5
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
2016-02-17 15:02 ` Peter Korsgaard
@ 2016-02-18 1:05 ` matthew.amlogic shyu
2016-02-19 10:18 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: matthew.amlogic shyu @ 2016-02-18 1:05 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Wednesday, February 17, 2016, Peter Korsgaard <peter@korsgaard.com>
wrote:
> >>>>> "Matthew" == Matthew Shyu <matthew.shyu.amlogic@gmail.com
> <javascript:;>> writes:
>
> > From: Matthew Shyu <matthew.shyu@amlogic.com <javascript:;>>
> > The Configure script in openssl takes install_prefix from env by default
> > $install_prefix= "$ENV{'INSTALL_PREFIX'}"
> > However, the INSTALL_PREFIX points to *TARGET* folder instead of
> > *HOST* folder.
> > This is fixed by intentionally setting install_prefix to blank.
>
> Sorry, I'm not following you here. Do you mean that you have exported
> INSTALL_PREFIX=<something> in your environment outside Buildroot? We do
> indeed pass INSTALL_PREFIX to make install when we install the target
> version to staging/target, but I don't see the relation to the host
> variant?
>
> Yes, the INSTALL_PREFIX env is passed in from buildroot. However, as
you said, it points to output/staging/usr. For host variant, the correct
installation path should be output/host/usr, which is set by --prefix. The
idea of this patch is for host-openssl not to use --install-prefix but to
use --prefix.
>
> > Signed-off-by: Matthew Shyu <matthew.shyu@amlogic.com <javascript:;>>
> > ---
> > package/openssl/openssl.mk | 1 +
> > 1 file changed, 1 insertion(+)
>
> > diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
> > index b7498a7..c35e93f 100644
> > --- a/package/openssl/openssl.mk
> > +++ b/package/openssl/openssl.mk
> > @@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS
> > $(HOST_CONFIGURE_OPTS) \
> > ./config \
> > --prefix=$(HOST_DIR)/usr \
> > + --install_prefix= \
> > --openssldir=$(HOST_DIR)/etc/ssl \
> > --libdir=/lib \
> > shared \
> > --
> > 1.7.9.5
>
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net <javascript:;>
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
>
> --
> Bye, Peter Korsgaard
>
Regards,
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160218/c159dbe7/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
2016-02-18 1:05 ` matthew.amlogic shyu
@ 2016-02-19 10:18 ` Peter Korsgaard
2016-02-19 10:33 ` matthew.amlogic shyu
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-02-19 10:18 UTC (permalink / raw)
To: buildroot
>>>>> "matthew" == matthew amlogic shyu <matthew.shyu.amlogic@gmail.com> writes:
Hi,
>> > The Configure script in openssl takes install_prefix from env by default
>> > $install_prefix= "$ENV{'INSTALL_PREFIX'}"
>> > However, the INSTALL_PREFIX points to *TARGET* folder instead of
>> > *HOST* folder.
>> > This is fixed by intentionally setting install_prefix to blank.
>>
>> Sorry, I'm not following you here. Do you mean that you have exported
>> INSTALL_PREFIX=<something> in your environment outside Buildroot? We do
>> indeed pass INSTALL_PREFIX to make install when we install the target
>> version to staging/target, but I don't see the relation to the host
>> variant?
> Yes, the INSTALL_PREFIX env is passed in from buildroot. However, as
> you said, it points to output/staging/usr. For host variant, the correct
> installation path should be output/host/usr, which is set by --prefix. The
> idea of this patch is for host-openssl not to use --install-prefix but to
> use --prefix.
But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the
make-install-to-staging step, and not when we configure/build/install
the host variant:
define OPENSSL_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
endef
define HOST_OPENSSL_INSTALL_CMDS
$(MAKE) -C $(@D) install
endef
define OPENSSL_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
rm -rf $(TARGET_DIR)/usr/lib/ssl
rm -f $(TARGET_DIR)/usr/bin/c_rehash
endef
So I'm still not sure what you are trying to solve?
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
2016-02-19 10:18 ` Peter Korsgaard
@ 2016-02-19 10:33 ` matthew.amlogic shyu
2016-02-19 10:36 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: matthew.amlogic shyu @ 2016-02-19 10:33 UTC (permalink / raw)
To: buildroot
2016-02-19 18:18 GMT+08:00 Peter Korsgaard <peter@korsgaard.com>:
> >>>>> "matthew" == matthew amlogic shyu <matthew.shyu.amlogic@gmail.com>
> writes:
>
> Hi,
>
> >> > The Configure script in openssl takes install_prefix from env by
> default
> >> > $install_prefix= "$ENV{'INSTALL_PREFIX'}"
> >> > However, the INSTALL_PREFIX points to *TARGET* folder instead of
> >> > *HOST* folder.
> >> > This is fixed by intentionally setting install_prefix to blank.
> >>
> >> Sorry, I'm not following you here. Do you mean that you have exported
> >> INSTALL_PREFIX=<something> in your environment outside Buildroot? We do
> >> indeed pass INSTALL_PREFIX to make install when we install the target
> >> version to staging/target, but I don't see the relation to the host
> >> variant?
>
> > Yes, the INSTALL_PREFIX env is passed in from buildroot. However, as
> > you said, it points to output/staging/usr. For host variant, the
> correct
> > installation path should be output/host/usr, which is set by --prefix.
> The
> > idea of this patch is for host-openssl not to use --install-prefix but
> to
> > use --prefix.
>
> But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the
> make-install-to-staging step, and not when we configure/build/install
> the host variant:
>
> define OPENSSL_INSTALL_STAGING_CMDS
> $(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
> endef
>
> define HOST_OPENSSL_INSTALL_CMDS
> $(MAKE) -C $(@D) install
> endef
>
> define OPENSSL_INSTALL_TARGET_CMDS
> $(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
> rm -rf $(TARGET_DIR)/usr/lib/ssl
> rm -f $(TARGET_DIR)/usr/bin/c_rehash
> endef
>
> So I'm still not sure what you are trying to solve?
>
> Ha, you're right!
I found that I have a stupid package inside my Buildroot tree that's
exporting INSTALL_PREFIX during the build and thus messing up my
environment.
There's nothing wrong with host-openssl package.
My bad. Sorry.
> --
> Venlig hilsen,
> Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160219/818deaa6/attachment.html>
^ permalink raw reply [flat|nested] 6+ messages in thread* [Buildroot] [PATCH 1/1] fix host-openssl binary installation
2016-02-19 10:33 ` matthew.amlogic shyu
@ 2016-02-19 10:36 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2016-02-19 10:36 UTC (permalink / raw)
To: buildroot
>>>>> "matthew" == matthew amlogic shyu <matthew.shyu.amlogic@gmail.com> writes:
Hi,
>> But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the
>> make-install-to-staging step, and not when we configure/build/install
>> the host variant:
>>
>> define OPENSSL_INSTALL_STAGING_CMDS
>> $(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
>> endef
>>
>> define HOST_OPENSSL_INSTALL_CMDS
>> $(MAKE) -C $(@D) install
>> endef
>>
>> define OPENSSL_INSTALL_TARGET_CMDS
>> $(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
>> rm -rf $(TARGET_DIR)/usr/lib/ssl
>> rm -f $(TARGET_DIR)/usr/bin/c_rehash
>> endef
>>
>> So I'm still not sure what you are trying to solve?
> Ha, you're right!
> I found that I have a stupid package inside my Buildroot tree that's
> exporting INSTALL_PREFIX during the build and thus messing up my
> environment.
> There's nothing wrong with host-openssl package.
Ahh, that explains it ;)
> My bad. Sorry.
No problem. I've marked you patch as rejected in patchwork.
--
Venlig hilsen,
Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-19 10:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 10:41 [Buildroot] [PATCH 1/1] fix host-openssl binary installation Matthew Shyu
2016-02-17 15:02 ` Peter Korsgaard
2016-02-18 1:05 ` matthew.amlogic shyu
2016-02-19 10:18 ` Peter Korsgaard
2016-02-19 10:33 ` matthew.amlogic shyu
2016-02-19 10:36 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox