docgroup / mpc Goto Github PK
View Code? Open in Web Editor NEWMPC (The Makefile, Project, and Workspace Creator)
MPC (The Makefile, Project, and Workspace Creator)
Hi,
I'm using very simple .mwc and .mpc files (see attachments).
When you repeat the command a second time:
perl $MPC/mwc.pl -type make testModuleA.mwc -name_modifier *ABC
Generating 'make' output using testModuleA.mwc
Generation Time: 0s
Generating 'make' output using Makefile.testModuleAABC
Makefile.testModuleAABC: line 1:
ERROR: No workspace was defined
ERROR: Unable to process: Makefile.testModuleAABC
Total Time: 0s
This only happens on Linux.
I don't understand why "Generating 'make' output using Makefile.testModuleAABC" happens at all!?
No problem without -name_modifier.
Why is MWC trying to parse Makefile.testModuleAABC at all? Why is this only happening on Linux?
Under Mac OS, I tried to generate QT project script with MPC instead of qmake. I set $QTDIR=/usr/local/opt/qt. The libraries in $QTDIR/frameworks. But MWC can't find them.
How to use QT with ACE on Mac OS? Thanks.
I have cloned ace source , find it has no Makefile
In a use case we have some IDL generated files that have some user code between special tags and the IDL compiler is capable of generating the IDL files and keep the user code. On a realclean/clean these files shouldn't be removed, but when the IDL file is newer than the generated h/cpp it should be generated. Looks there is no support for this in MPC, have the concept of a precious file that is a generated file, but not removed on a clean/realclean.
Under Windows, I tried to generate QT project script with MPC instead of qmake, everythis is OK when I configured the QTDIR and generate the VS2015 script, but when I compile the project I got lnk2001, after my reserch I found the reason is the moc configure didn't work, I think this is a bug, but I failed to correct it, Would anybody help me! following is my custom mpc file
project(Demo05):build_files,lukeexe,lukeexeout,qt5_core_win,qt5_gui_win,qt5_widgets_win,lukedsagentus{
exename=Demo05
MOC_Files{ // failed work
mainwindow.h
}
UIC_Files{ // work
mainwindow.ui
}
QRC_Files{ // work
mainwindow.qrc
}
}
With C++Builder 12.0 (released Nov 2023) the workaround -GE:HIGHENTROPYVA=off
is not necessary anymore
The powershell out-file creates by default an unicode file (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-file?view=powershell-6). For usage on azure-devops/appveyor it would be easier when MPC could handle an unicode default.features file.
As note, out-file is also used for the > redirect, so using this redirect in a powershell script will create an unicode default.features.
I tried to run the test suit under TAO, and it fails probabilistically on stress_storable.
INFO: Running the test in /usr1/ACE_TAO/TAO/orbsvcs/tests/FT_Naming/stress_storable
Starting Primary: /usr1/ACE_TAO/TAO/orbsvcs/FT_Naming_Service/tao_ft_naming -ORBEndPoint iiop://dggphicprd02200:22461 -m 0 -u ./NameService -v ./Groups -n 10 -o ns.ior -h nm.ior -ORBDebuglevel 0 -ORBVerboseLogging 1 -ORBLogFile ns.log
======== Running the Storable Stress Test================
(635300|635300) - Acquiring Name Service
(635300|635300) - Client request handled by object at <MyLocation 1>
(635300|635300) - Client request handled by object at <MyLocation 4>
(635300|635300) - Client request handled by object at <MyLocation 6>
(635300|635300) - Client request handled by object at <MyLocation 6>
(635300|635300) - Client request handled by object at <MyLocation 1>
(635300|635300) - Client request handled by object at <MyLocation 3>
(635300|635300) - Client request handled by object at <MyLocation 4>
(635300|635300) - Client request handled by object at <MyLocation 6>
(635299|635299) - Removed Member at Location <MyLocation 6>
(635300|635300) - Client request handled by object at <MyLocation 3>
(635300|635300) - Client request handled by object at <MyLocation 4>
(635300|635300) - Client request handled by object at <MyLocation 4>
(635300|635300) - Client request handled by object at <MyLocation 5>
(635300|635300) - Client request handled by object at <MyLocation 3>
(635300|635300) - Client request handled by object at <MyLocation 4>
Server obj ref not obtained from Load Balancing Name Service
ERROR: exited with signal 11 : SEGV
ERROR: client returned 255
ERROR: server timedout
ERROR: server returned -1
Hello,
Is there a way to turn off GNU compiler optimizations from the .mpc
file?
My workaround for this is to remove the -O flags from the GENFLAGS
macros in every Makefile but that is quite cumbersome.
Thank you for the assistance.
Hi!
First of all, congratulations for your software. I have checked it for OpenDDS, and it is impresssive.
I am trying to integrate OpenDDS in a CMake project (using CMake's command ExternalProject_add). I know MPC vs CMake is a recurrent topic here (DOCGroup/ACE_TAO#266 and #104), and I am not capable of create a CMakeLists.txt from MPC, nor convert the whole ACE+TAO & OpenDDS to CMake (which would be... nonsense? as MPC works great).
My problem is that, despite managing to create a visual studio solution (I am working on Windows), I still have to open it and build the solution manually for getting the libraries. I could create a CMake script for doing it automatically, but the generators mismatching between CMake and MPC would be an issue (what if I want to use the Ninja generator, for example?).
I was thinking and there is a CMake's feature which would solve the automatic generation, independently of the underlying used generator. Cmake cannot only generate the solution/makefiles/whatever, can also build the generated solution. That would allow to use Cmake's ExternalProject_add, indicating to use MPC to generate and build the code, and smoothly joining both MPC and CMake.
Is there any command for building the code from MPC? I could not find it in the documentation. Would it be very difficult to implement it for a completely Perl newbie (I have experience in Python and C++).
Thanks!
Luis
A possible solution is to change workspace_per_project in modules\MakeWorkspaceBase.pm to return 0:
sub workspace_per_project {
#my $self = shift;
return 0; #return 1;
}
With that change, option -hierarchy seems to do what it is expected, and the default case is without "hierarchy".
Hi ,
As here DOCGroup/ACE_TAO#913 , mpc ignore CFLAGS DEBUG_CFLAGS CXXFLAGS DEBUG_CXXFLAGS, this make it not possible to build ace under conda env https://www.anaconda.com/utilizing-the-new-compilers-in-anaconda-distribution-5/
by inserting -name_modifier colibri_* into the command line the lib order changes and dependencies are not resolvable
#! /bin/sh
set -x
ROOT="$(dirname "$(pwd)")"
echo "$ROOT"
perl ../../tools/mpc/mwc.pl \
-type make \
-name_modifier colibri_* \
-value_template output_dir_ext=/colibri \
-value_template compilers=arm_colibri_gcc \
-value_template platforms=colibri_imx6 \
-include "./baseprojects" \
-relative PROJ_TOP="$ROOT" \
ws_develop_test.mwc
Makefile created without name modifier (compiles and links)
ut_mtdiscovery: core gsoap mtdiscovery
@cd ../3rd/mtdiscovery/unittest && $(MAKE) -f Makefile.ut_mtdiscovery all
Makefile created with name_modifier= colibri_* creates strange dependencies (cannot resolve libs)
ut_mtdiscovery: agg agg2d decfloat freetype png lua mtchart mtdiscovery
@cd /home/thomas/projects/pdk_linux/tresos-fw/mt-pdk/source/3rd/mtdiscovery/unittest && $(MAKE) -f colibri_Makefile all
Did start with this on https://github.com/jwillemsen/MPC/tree/jwi-readmemd but nested tables is not standard in markdown so need to see how we can handle that in a different way
I can't find a working way that uses the remove_from support to iterate through template_files and remove any found template file from the header files like below, it seems that template_file is always seen as regex but I want to match with the content of template_file. A possible solution for #50
<%foreach(uniq(template_files))%>
<ClCompile Include="<%template_file%>">
<%if(remove_from(header_files, template_file, header_file))%>
removed <%header_file%>
<%endif%>
With OpenDDS DDS_ROOT seems always to be expanded to a relative path for an example, the -use_env options doesn't seem to work. How can with MPC all environment variables be kept in the generated file?
It seems as though the project generation for Visual Studio was still based off a vc10-era template. Visual Studio 2017 allows for a compiler switch to target different ISO C++ Standards. There didn't seem to be an available option to set this using a specific statement in MPC files.
I've added a potential solution and submitted a pull request (#43) that adds a new template for vs2017 projects and includes a new tag (LanguageStandard) that can be used to control this new setting.
Hi there, MPC is a powerful tools for project creation, recently,I changed to android develop with NDK, I wonder if this powerful tool support NDK so development. best regards.
Updating from 15.5 to 15.6 revealed that VS2017 is interpreting vcxproj files differently now. When we have something like Qt MOC that processes a C++ header, it gets listed as both a regular header and a custom step input. The new VS2017 fails to load the project with "Cannot load project with duplicated project items"
This issue that was fixed for gnuace may need to be fixed in other templates:
DOCGroup/ACE_TAO#924
There are no CI builds for MPC, maybe add a azure build which compiles the ACE/TAO/CIAO/DAnCE core with MPC as minimal check
To ease debugging #177, I created a simple VSCode extension to basic support for MPC, which I pushed to vscode-mpc. This properly should live under the DOCGroup organization before being added to the VSCode extension marketplace. Could you please fork and adopt this repository?
The extension supports .mpc
and .mwc
, and also a little bit of .mpd
files (code-folding in particular).
Some projects are using the template_files section also to list the template header files so that they are combined with any template source file. For those projects it would help when MPC would filter any file from template_files also from header_files.
As example, when template_files contains foo_t.h it should be removed from header_files
vcpkg as package manager on windows creates debug\lib for the debug libraries (just as debug\bin), this is not matching the xercesc/openssl mpb files, they only expect lib
See DOCGroup/ACE_TAO#2148, looks the wildcards in the MPC files (*.cpp
) doesn't work with perl 5.38 on Windows
I'm working under linux recently, and I want to create a static library, so my mpc file as follow
project(XXX){
staticname=XXX
...
}
but when I use mwc.pl to generate make type project script, I got the Makefile as follow:
......
AREXT = .a
LIB =
SOEXT = .so **// here
SHTARGETDIR = ./
SHLIB =
...
all: $(SHLIB) // and here
@$(TESTDIRSTART) "$(SHTARGETDIR)"
but par of the make.mpd file as follow
....
<%if(staticname)%>
AREXT = <%lib_ext%>
LIB =
<%endif%>
<%endif%>
<%if(dll_ext && sharedname)%>
SOEXT = <%dll_ext%>
SHTARGETDIR = <%if(dllout)%><%dllout%><%if(!compares(dllout, .))%><%output_dir_ext%><%endif%><%else%><%libout%><%if(!compares(libout, .))%><%output_dir_ext%><%endif%><%endif%><%slash%><%targetoutdir%>
<%if(version && versupport)%>
SHLIB_BASE =
<%endif%>
SHLIB =
<%if(shflags)%>
SHFLAGS = <%shflags%>
<%endif%>
......
if every thing is ok, by no means it will generate script as above, can anyone help me out?
See DOCGroup/ACE_TAO#494, OpenSSL 1.1 and newer have different library names on windows
Now available on github actions, see actions/runner-images#3949
MPC still usese azure pipelines, should move to github actions
Under Project Keywords there is missing a option to specify where *.o files should be placed. This is useful when someone is using a shared network drive for source files.
Reported by microsoft/vcpkg#16551, at the moment the user does a Visual Studio release build there is a tao_cosnaming.lib created for the tao_cosnaming DLL but also the EXE. In debug mode there is a tao_cosnaming.lib and tao_cosnamingd.lib.
vcpkg does a copy of all lib files into the install directory, with debug we just get one of the two libraries, in release we get both.
Hi,
CMake is an open-source, cross-platform family of tools designed to build, test and package software. It's very popular.
Could you please add CMake generation support?
Probably we get a cygwin perl or some other version, as far as I remember we had issues in the past with that, see DOCGroup/ACE_TAO#392
Hi,
I am trying to build my own OpenDDS program on Linux and am using MPC to do that. I set everything up and use the command, "$MPC_ROOT/mwc.pl --type make BITData.mwc" It says "generating 'make' output using BITData.mwc" but then skips all of the projects I entered in the mpc file.
"Skipping BITData_Idl (BITData.mpc); it avoids corba_e_micro"
"Skipping BITData_Publisher (BITData.mpc); it avoids corba_e_micro"
"Skipping BITData_Subscriber (BITData.mpc); it avoids corba_e_micro"
Any ideas?
Also side note, the type "gnuace" is not in the help menu and does not work for me.
If I have a workspace file named e.g. A.mwc, and use -type make, then mwc.pl generates two files:
Makefile.A, and
Makefile
There is a problem if I have two mwc files in the same directory, since I only can have one single file named Makefile.
Preferably, the names of the generated files should be:
A.project, and A.workspace, or something else similar to this.
For solving #50 I want to filter out any element from template_files from header_files. It would be helpful to have a way to check if template_files has a certain element like below, can't find something in MPC that does this
<%foreach(uniq(header_files))%>
<%!exists(template_files, header_file)%>
do something
<%endexists%>
%<endfor%>
MPC doesn't have any base projects to support qt5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.