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

Can't compile sims after Trick update with "write template directive before template instance (#1679)" pull request #1697

Closed
dandexter opened this issue Apr 21, 2024 · 7 comments

Comments

@dandexter
Copy link

dandexter commented Apr 21, 2024

The latest Trick with the pull request "write template directive before template instance (#1679)" results in swig file errors and now I can't compile any of my simulations.

For example, when I compile the TrickHLA/sims/SpaceFOM/SIM_sine simulation I get this error:

build/Users/ddexter/projects/TrickHLA/include/TrickHLA/Object_py.i:21: Error: Missing #endif for conditional starting here
build/Users/ddexter/projects/TrickHLA/include/TrickHLA/Interaction_py.i:20: Error: Missing #endif for conditional starting here
build/Users/ddexter/projects/TrickHLA/include/TrickHLA/Object_py.i:21: Error: Missing #endif for conditional starting here
make: *** [build/Users/ddexter/projects/TrickHLA/include/SpaceFOM/ExecutionControl_py.cpp] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/Users/ddexter/projects/TrickHLA/include/SpaceFOM/ExecutionConfiguration_py.cpp] Error 1
make: *** wait: No child processes.  Stop.

The Object_py.i file generated with Trick with the pull request is missing the following few lines for the Attribute class (diff Object_py.i. PR1679_Object_py.i):

< namespace TrickHLA{
< 
< class Attribute;
< } 
< #endif 
< 

Object_py.i code segment from Trick that does compile the simulation.

#ifdef SWIG
%import "build/Users/ddexter/projects/TrickHLA/include/TrickHLA/Attribute_py.i"
#else
namespace TrickHLA{

class Attribute;
} 
#endif

namespace TrickHLA{

class Manager;
class Federate;
class Conditional;
class Packing;
class OwnershipHandler;
class ObjectDeleted;
class LagCompensation;

Object_py.i code segment from Trick with Pull Request 1679 that does Not compile the simulation. It is missing the "class Attribute" section.

#ifdef SWIG
%import "build/Users/ddexter/projects/TrickHLA/include/TrickHLA/Attribute_py.i"
#else
namespace TrickHLA{

class Manager;
class Federate;
class Conditional;
class Packing;
class OwnershipHandler;
class ObjectDeleted;
class LagCompensation;

I am using this swig version:

% swig -version

SWIG Version 4.2.1

Compiled with clang++ [x86_64-apple-darwin22.6.0]

Configured options: +pcre
@hchen99
Copy link
Contributor

hchen99 commented Apr 21, 2024

Please try PR#1696 to see if your problem is fixed

@dandexter
Copy link
Author

dandexter commented Apr 22, 2024

I ended up having to clone the repo pointed to in PR#1696 and I was able to compile my simulations using it. However, I don't think this is a valid test unless PR#1696 is based off the latest Trick master branch and included the code from PR#1679 that is causing the issue.

What is the git command to merge the pull request against my clone of the Trick master branch?

@hchen99
Copy link
Contributor

hchen99 commented Apr 22, 2024

PR#1696 does include the code from PR#1679. PR#1696 only does't have is a minor documentation update comparing with the master. Any PR#1696 was really for fixing a typo in PR#1679

@dandexter
Copy link
Author

That's good news then and it appears PR#1696 fixed the issue I was seeing.

@hchen99
Copy link
Contributor

hchen99 commented Apr 22, 2024

Thanks for confirming.

@sharmeye
Copy link
Contributor

These changes have been merged into master, so please confirm that the issue is resolved in the latest master commit.

@dandexter
Copy link
Author

That fixed it. Thanks.

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

No branches or pull requests

3 participants