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

[ace] Let ssl feature able to work on Linux when selected #9016

Merged
merged 10 commits into from
Jan 21, 2020
Merged

[ace] Let ssl feature able to work on Linux when selected #9016

merged 10 commits into from
Jan 21, 2020

Conversation

gnaggnoyil
Copy link
Contributor

According to documentation(https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html#sslinstall), to build ACE_SSL library under Linux, ssl=1 make option and SSL_ROOT environment variable need to be set when invoking make command. The current portfile does not handle this thus lead to a install error:

CMake Error at ports/ace/portfile.cmake:153 (file):
  file INSTALL cannot find
  "/home/gnaggnoyil/vcpkg/buildtrees/ace/src/ACE-src-6-f4060da67f/lib/libACE_SSL.a".
Call Stack (most recent call first):
  ports/ace/portfile.cmake:174 (install_ace_library)
  scripts/ports.cmake:94 (include)

This PR is intended to fix such issue.

@gnaggnoyil
Copy link
Contributor Author

Also, there seems to be other issues on current portfile too:

  • uses_wchar=1, which is activated with wchar feature enabled, would rather replace APIs with wchar's version rather than simply adding them into the library.
  • The CONTROL file lists xml as a feature instead of zlib, while portfile.cmake checks zlib but not xml.

I'm not sure whether these should be considered as issue or not, therefore this PR isn't going to touch them too much.

@cbezault
Copy link
Contributor

/azp run

@PhoebeHui PhoebeHui self-requested a review November 18, 2019 09:44
@gnaggnoyil
Copy link
Contributor Author

gnaggnoyil commented Nov 18, 2019

OK I just found a more serious problem: those libraries generated under ${ACE_ROOT}/lib after a make build under x64-linux triplet are just symlinks to the generated library file in source dir:

gnaggnoyil-wsl@gnaggnoyil-lap:~/vcpkg/buildtrees/ace/src/ACE-src-6-f4060da67f/lib$ ls -al
total 0
drwxrwxrwx 1 gnaggnoyil gnaggnoyil 512 Nov 15 17:30 .
drwxrwxrwx 1 gnaggnoyil gnaggnoyil 512 Nov 15 17:27 ..
-rw-r--r-- 1 gnaggnoyil gnaggnoyil  69 Jul 30 16:05 .empty
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  15 Nov 15 17:29 libACE.a -> ../ace/libACE.a
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  39 Nov 15 17:29 libACE_Compression.a -> ../ace/Compression/libACE_Compression.a
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  25 Nov 15 17:29 libACE_ETCL.a -> ../ace/ETCL/libACE_ETCL.a
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  32 Nov 15 17:29 libACE_ETCL_Parser.a -> ../ace/ETCL/libACE_ETCL_Parser.a
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  47 Nov 15 17:30 libACE_Monitor_Control.a -> ../ace/Monitor_Control/libACE_Monitor_Control.a
lrwxrwxrwx 1 gnaggnoyil gnaggnoyil  46 Nov 15 17:29 libACE_RLECompression.a -> ../ace/Compression/rle/libACE_RLECompression.a

Therefore that the original portfile.cmake just copy/install the files under ${ACE_ROOT}/lib in Linux would cause library files installed incorrectly. ACE itself provides an installation method that can install both debug and release builds. I've just added a commit that implemented correct installation.

@grdowns grdowns self-assigned this Nov 18, 2019
@JackBoosY
Copy link
Contributor

/azp run

@jwillemsen
Copy link
Contributor

See #9074 for the upgrade to the latest ACE release

@gnaggnoyil
Copy link
Contributor Author

@jwillemsen Sure, I'll update my PR once upstream's ACE version in port is updated.

@ras0219-msft
Copy link
Contributor

/azp run

@ras0219-msft
Copy link
Contributor

#9074 has been merged.

@gnaggnoyil
Copy link
Contributor Author

PR updated. What's the meaning of the error messgae in the azure pipeline? Does it indicates a test failure?

@gnaggnoyil
Copy link
Contributor Author

gnaggnoyil commented Nov 23, 2019

Hmm... so indeed it indicates a test failure but install-x64-linux-dbg-err.log says...

/bin/sh: 4: /ci/myagent/_work/1/s/buildtrees/ace/src/ACE-src-6-e5c02419c3/MPC/prj_install.pl: not found
make[1]: *** [install] Error 127
make: *** [install] Error 2

That's stange... I've checked the command vcpkg install ace[*] from a fresh build of my VcPkg repo and it's impossible there isn't prj_install.pl under ${ACE_ROOT}/MPC so what the heck was happpening in CI's pipeline?

@JackBoosY
Copy link
Contributor

I can repro it on my machine now. And I found this file exists in SOURCE_PATH/bin/MakeProjectCreator/templates/gnu.mpd
line 808:
INSTALLER ?= $(MPC_ROOT)/prj_install.pl
line 840:

ifeq ($(INSTALLER),/prj_install.pl)
INSTALLER = $(ACE_ROOT)/MPC/prj_install.pl
endif

SOURCE_PATH/MPC/modules/Options.pm
line 118:
" -genins Generate .ins files for use with prj_install.pl.\n",

Do they have a relationship?

Copy link
Contributor

@JackBoosY JackBoosY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to use the following structure:

if (VCPKG_TARGET_IS_WINDOWS)
... //Windows
else()
... //UNIX
endif()

ports/ace/portfile.cmake Outdated Show resolved Hide resolved
ports/ace/portfile.cmake Outdated Show resolved Hide resolved
@gnaggnoyil
Copy link
Contributor Author

@JackBoosY No, I think those are probably unrelated with CI's test failure. ACE_ROOT was set by previous contributor and it has been worked well; MPC_ROOT defaults to $ACE_ROOT/MPC and there are no other files called prj_install.pl except the one under $ACE_ROOT/MPC

@gnaggnoyil
Copy link
Contributor Author

gnaggnoyil commented Nov 25, 2019

Ahh... test under linux failed again.. This time, ace_root_mpc_ls-x64-linux-out.log which is supposed to print ls -al on $ACE_ROOT/MPC gives the following output:

total 144
drwxr-xr-x  9 vcpkg vcpkg  4096 Nov 25 12:51 .
drwxr-xr-x 24 vcpkg vcpkg  4096 Nov 25 12:51 ..
-rw-r--r--  1 vcpkg vcpkg 14948 Nov 22 08:27 ChangeLog
-rw-r--r--  1 vcpkg vcpkg  7168 Nov 22 08:27 MPC.ico
-rw-r--r--  1 vcpkg vcpkg   913 Nov 22 08:27 PROBLEM-REPORT-FORM
-rwxr-xr-x  1 vcpkg vcpkg 16884 Nov 22 08:27 clone_build_tree.pl
-rwxr-xr-x  1 vcpkg vcpkg  4444 Nov 22 08:27 combine_dsw.pl
drwxr-xr-x  2 vcpkg vcpkg  4096 Nov 25 12:51 config
-rwxr-xr-x  1 vcpkg vcpkg  5957 Nov 22 08:27 create_base.pl
-rwxr-xr-x  1 vcpkg vcpkg  1070 Nov 22 08:27 depgen.pl
drwxr-xr-x  2 vcpkg vcpkg  4096 Nov 25 12:51 devtools
drwxr-xr-x  4 vcpkg vcpkg  4096 Nov 25 12:51 docs
-rwxr-xr-x  1 vcpkg vcpkg  3230 Nov 22 08:27 generate_export_header.pl
drwxr-xr-x  2 vcpkg vcpkg  4096 Nov 25 12:51 history
drwxr-xr-x  3 vcpkg vcpkg  4096 Nov 25 12:51 modules
-rwxr-xr-x  1 vcpkg vcpkg  2128 Nov 22 08:27 mpc.pl
-rwxr-xr-x  1 vcpkg vcpkg  2214 Nov 22 08:27 mwc.pl
-rwxr-xr-x  1 vcpkg vcpkg 13883 Nov 22 08:27 prj_install.pl
-rwxr-xr-x  1 vcpkg vcpkg  6618 Nov 22 08:27 registry.pl
drwxr-xr-x  2 vcpkg vcpkg  4096 Nov 25 12:51 rpm
drwxr-xr-x  2 vcpkg vcpkg  4096 Nov 25 12:51 templates
-rwxr-xr-x  1 vcpkg vcpkg  3804 Nov 22 08:27 vs_postclean.pl

So prj_install.pl is not missing nor have invalid permission. How on earth could such failure happen then...?

@JackBoosY
Copy link
Contributor

JackBoosY commented Nov 26, 2019

install-x64-linux-dbg-out.log:

make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/GNUmakefile.ACE MAKEFLAGS=w

perl -ne'if (/^#END MPC-Generated Install Info/) {exit 0}' \
  -e'elsif (/^#BEGIN MPC-Generated Install Info/) {$ok=1}' \
  -e'elsif ($ok && s/^#//) {print}' GNUmakefile.ACE | \
/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/MPC/prj_install.pl -i -s lib_output,header_files,template_files,inline_files,installdata_files \
  -b header_files=include/ace -b template_files=include/ace -b inline_files=include/ace -o lib_output=lib -x installdata_files -b installdata_files=share/ace   \
  /home//work/9016/vcpkg/packages/ace_x64-linux
GNUmakefile.ACE:523: recipe for target 'install' failed
make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace'
GNUmakefile:31: recipe for target 'install' failed

install-x64-linux-dbg-err.log:

/bin/sh: 4: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/MPC/prj_install.pl: not found
make[1]: *** [install] Error 127
make: *** [install] Error 2

make-x64-linux-dbg-err.log:

ACE_TkReactor will not be built due to the following disabled make macros: tk
ACE_FlReactor will not be built due to the following disabled make macros: x11 gl fl
ACE_XtReactor will not be built due to the following disabled make macros: x11 xt

make-x64-linux-dbg-out.log:

make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/GNUmakefile.ACE MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/FlReactor'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/TkReactor'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/XtReactor'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/TkReactor/GNUmakefile.ACE_TkReactor MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/TkReactor'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression/GNUmakefile.ACE_Compression MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1


make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression'
GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/FlReactor/GNUmakefile.ACE_FlReactor MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/FlReactor'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression/rle'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/XtReactor/GNUmakefile.ACE_XtReactor MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/XtReactor'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL/GNUmakefile.ACE_ETCL MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression/rle/GNUmakefile.ACE_RLECompression MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Compression/rle'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL/GNUmakefile.ACE_ETCL_Parser MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/ETCL'
make[1]: Entering directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Monitor_Control'

GNUmakefile: /home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Monitor_Control/GNUmakefile.Monitor_Control MAKEFLAGS=w -j --jobserver-fds=4,5 -- debug=1

make[1]: Leaving directory '/home//work/9016/vcpkg/buildtrees/ace/src/ACE-src-6-e5c02419c3/ace/Monitor_Control'

@jwillemsen
Copy link
Contributor

Does it work locally with the updated portfile? Did test my changes in the past for Windows locally, that helped a lot to find issues

@gnaggnoyil
Copy link
Contributor Author

@jwillemsen Yes tested with Archlinux latest and Ubuntu 18.04, both of which work. That's why I'm having no idea about this CI test failure.

@jwillemsen
Copy link
Contributor

No idea why this fails on CI when it works locally.

@JackBoosY
Copy link
Contributor

@vicroms

/bin/sh: 4: /ci/myagent/_work/1/s/buildtrees/ace/src/ACE-src-6-e5c02419c3/MPC/prj_install.pl: not found
make[1]: *** [install] Error 127
make: *** [install] Error 2

This file should exist in source path, can you check this?

Thanks.

@PhoebeHui
Copy link
Contributor

@gnaggnoyil , thanks for the PR!
Could you also update ace CONTROL file? the revision should be 'Version: 6.5.7-1'.

@gnaggnoyil
Copy link
Contributor Author

@PhoebeHui Sorry I forgot to bump tweak version before. I've bumped it now.

@JackBoosY Is path buildtrees/ace/src/ACE-src-6-e5c02419c3/MPC/prj_install.pl missing in your environment?

@JackBoosY
Copy link
Contributor

@gnaggnoyil File prj_install.pl exists on my path, so I think it's a fake error.

@gnaggnoyil
Copy link
Contributor Author

Just have this CI failure reproduceable in a fresh Ubuntu 18.04 docker container, where the failure seems to be the issue described in https://www.perlmonks.org/?node_id=322531 . It seems solutions provided by the link above can solve this failure, yet I still have no idea why such failure doesn't happen on my WSL distributions. Perhaps I should run tests on a real Linux machine but now I'm going to fix this failure first.

@jwillemsen
Copy link
Contributor

The port file always downloads the zip file which has windows line endings, for non-windows systems we ship .tar.gz/.tar.bz2 files, maybe you can select a different file to download?

@JackBoosY JackBoosY self-requested a review December 13, 2019 05:56
ports/ace/portfile.cmake Outdated Show resolved Hide resolved
ports/ace/portfile.cmake Outdated Show resolved Hide resolved
ports/ace/portfile.cmake Outdated Show resolved Hide resolved
@jwillemsen
Copy link
Contributor

Any updates on this one?

@vicroms
Copy link
Member

vicroms commented Jan 8, 2020

/azp run

1 similar comment
@JackBoosY
Copy link
Contributor

/azp run

@gnaggnoyil
Copy link
Contributor Author

So many package installation failed on osx that seems to be unreleated with this PR. What was happening there?

@JackBoosY
Copy link
Contributor

@gnaggnoyil These failure have no relationship with this PR, and we are fixing that.

@jwillemsen
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 9016 in repo microsoft/vcpkg

vcpkg_copy_pdbs()

# Handle copyright
file(COPY ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ace)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this can be done in one step, see #9655 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be. I'll have a look at it.

@JackBoosY
Copy link
Contributor

/azp run

@jwillemsen
Copy link
Contributor

jwillemsen commented Jan 17, 2020

OSX fixes in #9726

@jwillemsen
Copy link
Contributor

Looks the xercesc issue got fixed, can someone rerun this PR on CI?

@vicroms vicroms merged commit 9e6ca40 into microsoft:master Jan 21, 2020
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

Successfully merging this pull request may close these issues.

8 participants