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

Order-only-prerequisites don't seem to be honoured #274

Open
ScottA678 opened this issue Dec 5, 2023 · 7 comments
Open

Order-only-prerequisites don't seem to be honoured #274

ScottA678 opened this issue Dec 5, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@ScottA678
Copy link

Recipe includes an order-only-prerequisite for QTMMSNDM:
MM00200.PGM -- CRTPGM
MM00200.PGM: private TEXT = SNDMIMEF - Send MIME Email processor program
MM00200.PGM: private STGMDL = SNGLVL
MM00200.PGM: MM00200.MODULE STRING_X.SRVPGM TRANSLATE.SRVPGM ER00100.SRVPGM | /QSYS.LIB/QTCP.LIB/QTMMSNDM.SRVPGM
***

Message indicates QTMMSNDM will be included:
=== Creating program [MM00200] from modules [MM00200] and service programs [STRING_X TRANSLATE QTMMSNDM]

CRTPGM listing does not include QTMMSNDM
Module Library Module Library Module Library Module Library
MM00200 *LIBL
Service Service Service
Program Library Activation Program Library Activation Program Library Activation
STRING_X *LIBL *IMMED ER00100 *LIBL *IMMED
TRANSLATE *LIBL *IMMED

Compile fails with an unresolved reference:
Unresolved references . . . . . . . . . . . . : 1
Symbol Type Library Object Bound Identifier
0000001A *MODULE BLD_XP MM00200 *YES QtmmSendMail

@johnsherrill
Copy link

First I wonder what the 3 asterisks are after the service program name. Removing them may fix the issue. Another comment would be if this line:
MM00200.PGM: MM00200.MODULE STRING_X.SRVPGM TRANSLATE.SRVPGM ER00100.SRVPGM | /QSYS.LIB/QTCP.LIB/QTMMSNDM.SRVPGM***
really take two lines in you recipe, then it needs a continuation after the .../QTCP.LIB. so the line might look like this:
MM00200.PGM: MM00200.MODULE STRING_X.SRVPGM TRANSLATE.SRVPGM ER00100.SRVPGM |
/QSYS.LIB/QTCP.LIB/QTMMSNDM.SRVPGM

@ScottA678
Copy link
Author

ScottA678 commented Dec 6, 2023

The 3 asterisks are a typo left when I applied bold to the line.
That line is a single line in the recipe, it runs onto 2 lines in the first comment
Here it is as a code block:

# MM00200.PGM -- CRTPGM
MM00200.PGM: private TEXT = SNDMIMEF - Send MIME Email processor program
MM00200.PGM: private STGMDL = *SNGLVL
MM00200.PGM: MM00200.MODULE STRING_X.SRVPGM TRANSLATE.SRVPGM ER00100.SRVPGM | /QSYS.LIB/QTCP.LIB/QTMMSNDM.SRVPGM

@edmundreinhardt
Copy link
Member

Hmm I have not tried an absolutely qualified SRVPGM like that. Is it an option to add QTCP into the postUsrLibl of the project? Then that library will be searched for the QTMMSNDM SRVPGM

@ScottA678
Copy link
Author

ScottA678 commented Dec 18, 2023

I added the library and changed the recipe:

"setIBMiEnvCmd": [
        "CHGLIBL (QTEMP BLD_XP BLD_XPDB QGPL QTCP) CURLIB(*SAME)]"
MM00200.PGM: private STGMDL = *SNGLVL
MM00200.PGM: MM00200.MODULE STRING_X.SRVPGM TRANSLATE.SRVPGM ER00100.SRVPGM | QTMMSNDM.SRVPGM

Now QTMMSNDM is being built:

make: *** No rule to make target 'QTMMSNDM.SRVPGM', needed by 'MM00200.PGM'.
make: Target 'MM00200.PGM' not remade because of errors.

@edmundreinhardt
Copy link
Member

OK, some progress then.
I was wondering why you have the pipe | symbol beofre the QTMMSNDM.SRVPGM?
So what library is QTMMSNDM supposed to be found in?
What is the value of CURLIB?
So where are you specifying this CHGLIBL command?
For the environment of the BOB build, it is the settings in iproj.json that determine that.
For example you could put in

  "curlib": "BLD_XP",
  "preUsrlibl": [
    "BLD_XPDB"
  ],

@ScottA678
Copy link
Author

I updated the previous comment to show where CHGLIBL is defined.
The setIBMiEnvCmd is in iproj.json
I am using this as an alternative to using preUsrLibl and postUserLibl.
I prefer the library list to be explicitly defined for every build, rather than massage the user library list.

QTMMSNDM is in library QTCP, the pipe symbol defines it as a dependent service program that is not part of the current project, but must exist for the build to complete.

@edmundreinhardt
Copy link
Member

It may be that we have not yet encountered the | option and we have to do some more work to support it.
Thanks for bringing it to our attention

@edmundreinhardt edmundreinhardt added the enhancement New feature or request label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants