Comments (10)
That's very likely; old autotools have lots of issues that later versions have
improved on.
We try to make the code itself work on as old (and diverse) a platform as we can
practically support, but for maintainer tools, folks will need to use something
relatively recent.
Original comment by [email protected]
on 2 May 2008 at 11:19
- Changed state: WontFix
from ctemplate.
"That's very likely; old autotools have lots of issues that later versions have
improved on."
I think that's definitely understandable, but Automake 1.10 is actually a later
version than Automake 1.9...
Original comment by [email protected]
on 14 Apr 2009 at 3:32
from ctemplate.
Hmm, I guess new autotools have some issues too. :-) I'm re-opening the bug.
Unfortunately, I don't have easy access to automake-1.10. Can you attach to
this bug
report, the Makefile that automake-1.10 generates? Also, the files 'libtool'
and
'ltmain.sh' from your top-level directory.
Also, if you could include the full output of the 'make' command, that would be
helpful as well.
Original comment by [email protected]
on 14 Apr 2009 at 7:58
- Changed state: New
from ctemplate.
I'm seeing the same issue here with automake 1.11
I've attached libtool, ltmain.sh, Makefile, and the make log. Let me know if
you need
anything else. It seems to be something to do with the -xc, but removing that it
won't build either (it might be trying to link without C++ name-mangling?).
Original comment by [email protected]
on 1 Oct 2009 at 5:41
Attachments:
from ctemplate.
Thanks for all the data. It does look like the -xc is the problem. When I run
the
link line manually that automake 1.11 generates (with -xc), I get the same
error you see:
g++ -xc -O0 -ggdb -Wall -o statemachine_test statemachine_test.o
statemachine_test-statemachine.o
When I take out the -xc, it works correctly.
OK, it looks like the problem is in my Makefile.am script. I add -xc
explicitly when
compiling statemachine.c, just as an extra test there's no c++ code
accidentally in
there. I do this via CXXFLAGS, which I understand only applies at compile
time.
However, in automake 1.10 and later, it seems to apply (sometimes?) at link
time as well.
I'll have to look into the right fix. For now, you can take the '-cx' lines
out of
Makefile.am, and rerun automake. That should fix things -- let me know if it
doesn't.
Original comment by [email protected]
on 1 Oct 2009 at 4:52
- Changed state: Accepted
from ctemplate.
Removing the -cx I get problems with linking statemachine_test (see make output
below). Since statemachine_test.c is built with gcc (which seems right, its
extension
is .c) then the .o has statemachine_encode_char etc as non-mangled symbols.
If statemachine's meant to be callable from C should statemachine.h be wrapped
in
extern "C" perhaps? I'm not sure the intent of it all though.
ghost3:~/ctemplate-0.95 make
make all-am
make[1]: Entering directory `/home/matt/ctemplate-0.95'
gcc -DHAVE_CONFIG_H -I. -I./src -I./src -ggdb -Wall -D_FORTIFY_SOURCE=1
-pipe -O2
-MT statemachine_test.o -MD -MP -MF .deps/statemachine_test.Tpo -c -o
statemachine_test.o `test -f 'src/tests/statemachine_test.c' || echo
'./'`src/tests/statemachine_test.c
mv -f .deps/statemachine_test.Tpo .deps/statemachine_test.Po
/bin/sh ./libtool --tag=CXX --mode=link g++ -Wall -Wwrite-strings
-Woverloaded-virtual -Wno-sign-compare -ggdb -Wall -D_FORTIFY_SOURCE=1 -pipe
-O2 -o
statemachine_test statemachine_test.o statemachine.o
libtool: link: g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare
-ggdb
-Wall -D_FORTIFY_SOURCE=1 -pipe -O2 -o statemachine_test statemachine_test.o
statemachine.o
statemachine_test.o(.text+0x51): In function `test_encode_char':
src/tests/statemachine_test.c:342: undefined reference to
`statemachine_encode_char'
statemachine_test.o(.text+0xdc):src/tests/statemachine_test.c:347: undefined
reference to `statemachine_encode_char'
statemachine_test.o(.text+0x1ac):src/tests/statemachine_test.c:350: undefined
reference to `statemachine_encode_char'
statemachine_test.o(.text+0x1e3):src/tests/statemachine_test.c:353: undefined
reference to `statemachine_encode_char'
statemachine_test.o(.text+0x22c):src/tests/statemachine_test.c:356: undefined
reference to `statemachine_encode_char'
statemachine_test.o(.text+0x288):src/tests/statemachine_test.c:359: more
undefined
references to `statemachine_encode_char' follow
statemachine_test.o(.text+0x437): In function `test_copy':
src/tests/statemachine_test.c:281: undefined reference to
`statemachine_definition_new'
statemachine_test.o(.text+0x449):src/tests/statemachine_test.c:282: undefined
reference to `statemachine_new'
statemachine_test.o(.text+0x463):src/tests/statemachine_test.c:284: undefined
reference to `statemachine_definition_populate'
statemachine_test.o(.text+0x4d0):src/tests/statemachine_test.c:289: undefined
reference to `statemachine_duplicate'
statemachine_test.o(.text+0x544):src/tests/statemachine_test.c:292: undefined
reference to `statemachine_parse'
... continues for a page
Original comment by [email protected]
on 2 Oct 2009 at 1:15
from ctemplate.
Ah, that seems likely. The test is working already! I wonder why we don't get
any
bug reports like this with automake 1.10 though. In any case, I'll look into
this
and see if I can fix it for the next release. Probably because automake 1.10
compiles it as a c++ file.
Original comment by [email protected]
on 2 Oct 2009 at 8:16
from ctemplate.
I looked into this a big more, and the problem isn't the lack of extern "C", the
problem is that statemachine.cc needs to be compiled as a C file, despite its
extension. gcc is auto-detecting it as a c++ file (it's written to compile both
ways), and hence you're seeing these errors.
The right fix is to use -xc at compile time but not at link time. Or maybe it
would
work just to copy statemachine.cc to statemachine.c and to change the
Makefile.am to
change:
---
statemachine_test_SOURCES = src/tests/statemachine_test.c \
src/htmlparser/statemachine.cc
---
to
---
statemachine_test_SOURCES = src/tests/statemachine_test.c \
src/htmlparser/statemachine.c
---
(And also take out the -xc.) Do you want to try that and see if it fixes
things for you?
Original comment by [email protected]
on 2 Oct 2009 at 8:32
from ctemplate.
I looked into it, and there's no way (that I see) to use the -xc for compiling
but
not for linking. So I went with my other solution, which is to copy
statemachine.cc
to statemachine.c. That seems to work -- it invokes gcc now, not g++, so I can
get
rid of -xc -- so I'll put it in the next release of ctemplate.
Original comment by [email protected]
on 13 Oct 2009 at 10:20
- Changed state: Started
from ctemplate.
This should be fixed in ctemplate 0.97, just released.
Original comment by [email protected]
on 20 Apr 2010 at 5:53
- Changed state: Fixed
from ctemplate.
Related Issues (20)
- MSVC2015 support HOT 10
- README missing autogen.sh step for Compilation HOT 4
- python2 does not work with Mac with src/htmlparser/generate_fsm.py HOT 4
- make (dist)check fails HOT 5
- Macro Redefinition and Header Conflicts Causes Issue Installing HOT 5
- Include files *_fsm.h not exist HOT 6
- Not libctemplate.
- Libtool library used but 'LIBTOOL' is undefined HOT 3
- Preview documentation as GitHub Pages HOT 1
- Ctemplate issue while using protoc plugins HOT 3
- VS2017 latest version, build ctemplate failed HOT 11
- build with >=gcc-7.1 failed HOT 10
- Create release that supports Python 3 HOT 12
- How to skip blank field? HOT 1
- ctemplate 2.4 Mac OSX build failed
- How to install Ctemplate in Centos 7?
- when i reboot service, ctemplate produce coredump HOT 3
- `README.md` points to a non-existent file `INSTALL` HOT 1
- ctemplate-2.4 dose not has the configure file๏ผ HOT 6
- A bunch of undefined errors occur when make HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctemplate.