#18514: Upgrade of group cohomology spkg
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.8
Component: packages: | Resolution:
optional | Merged in:
Keywords: group cohomology | Reviewers:
Authors: Simon King | Work issues: Create a new-style
Report Upstream: None of the above | package with least effort
- read trac for reasoning. | Commit:
Branch: | Stopgaps:
Dependencies: #18494 |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
I think I need help, as I am virtually a beginner with Makefiles,
compiling c-sources, and/or creating a library.
For creating .o-files, I have the following rule in my Makefile, where
- VPATH is the path to the sources
- `CFLAGS=-I$(MTXINC) -I$(VPATH) -Wall $(OO) -g -fPIC`
- MTXINC is the SAGE_LOCAL/include
{{{
%.o: $(VPATH)/pgroup.h $(VPATH)/pincl.h $(VPATH)/pincl_decls.h
$(VPATH)/$*.c
@echo "Compiling $*.c"
@$(CC) $(CFLAGS) -c $(VPATH)/$*.c -o $@
}}}
The above is a modification of !MeatAxe's Makefile, which says
{{{
tmp/%.o: tmp/mk.dir src/%.c src/meataxe.h tmp/config.h
@echo "Compiling $*.c"
@$(CC) $(CFLAGS) -c src/$*.c -o $@
}}}
While the rule in !MeatAxe's Makefile works, in my Makefile it is not
executed. For example, when making pinc.o, the following is printed to
stdout:
{{{
gcc -I/home/king/Sage/git/sage/local/include
-I/home/king/Projekte/coho/p_group_cohomology-3.0/src/present/src -Wall
-g -fPIC -c -o pincl.o
/home/king/Projekte/coho/p_group_cohomology-3.0/src/present/src/pincl.c
}}}
In particular, the `@echo "compiling ..."` statement is not executed.
So, what is happening here? Is there an implicit make rule that takes
precedence over the explicit rule??
And further, when I try to build an executable (say,
`makeInclusionMatrix`), the rule says
{{{
makeInclusionMatrix: libmodres.a mim.o
$(CC) $(LFLAGS) -o makeInclusionMatrix mim.o libmodres.a
}}}
with
- `LFLAGS=-l$(MTXLIBNAME) -L$(LIBDIR)`,
- MTXLIBNAME=mtx
- LIBDIR=$(SAGE_LOCAL)/lib
Building the executable, the output indeed contains
{{{
gcc -lmtx -L/home/king/Sage/git/sage/local/lib -o makeInclusionMatrix
mim.o libmodres.a
}}}
but aborts with an error, saying
{{{
/home/king/Projekte/coho/p_group_cohomology-3.0/src/present/src/mim.c:51:
undefined reference to `MatFree'
}}}
But `MatFree` and other "undefined references" are defined in
`/home/king/Sage/git/sage/local/lib/libmtx.a`!
What is happening here?
--
Ticket URL: <http://trac.sagemath.org/ticket/18514#comment:69>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.