libMicro -- Small scrip fixes#1
Conversation
|
Thanks @andipla. It would be great if we could conditionalize this changes for just Debian for now so that we don't break the other platforms. Do you think you'd be able to do that? |
Makefile.com
Outdated
| echo "char * CC = \""$(CC)"\";" >> tattle.h | ||
| echo "char * extra_compiler_flags = \""$(extra_CFLAGS)"\";" >> tattle.h | ||
| $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lrt -lm | ||
| $(CC) -o tattle $(CFLAGS) -I. ../tattle.c libmicro.a -lrt -lm -lpthread |
There was a problem hiding this comment.
What is the missing symbol satisfied by adding -lpthread here?
|
That's pthread_create: /usr/bin/ld: libmicro.a(libmicro.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' The orignal version works in Debian wheezy, but not in jessie and stretch, those need the -lpthread thx! |
|
I added a condition for the ARCH variable in the bench scripts. The only system other than Debian wheezy/jessie/stretch I have around to test this is an Ubuntu 14.04 which has the same problems, so I added Ubuntu to the conditional as well. btw. Ubuntu also had the same problem without -lpthread in the Makefile.com, except it did not only complain about pthread_create but also about pthread_join. |
|
@andipla, I am behind on merging this, bare with me. |
bench
Outdated
| touch $IFILE | ||
|
|
||
| ARCH=`arch -k` | ||
| DISTRO=$(cat /etc/issue | head -n +1 | awk '{print $1}') |
There was a problem hiding this comment.
Can you change this to, cat /etc/issue 2> /dev/null, so that on distributions where /etc/issue does not exist, the error message won't be emitted?
portante
left a comment
There was a problem hiding this comment.
Latest changes look good. Still wondering about the addition of -lpthread and what problem it is solving.
Sorry, I was unaware I was pushing to an open pull request . Anyhow -- this was a long time ago. I tried to revert that patch and reproduce the issue, but since I am no longer able to reproduce the issue (debian trixie) I seemed to have back then I kicked that one commit out. |
Since the -k parameter is not supported by arch on Debian (tested on Jessie and Squeeze), the pathname was not correct. Thus the -k is dropped as it returns (as seems to be expected) the architecture of the compiling machine. Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at>
This is to insure that other platforms don't break. Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at> Signed-off-by: Andreas Gabriel-Platschek <andi.platschek@gmail.com>
While testing this on Ubuntu 14.04.4 LTS I noticed that in Ubuntu arch does not support the -k option either. Signed-off-by: Andreas Platschek <andi.platschek@gmail.com>
…null Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at>
Signed-off-by: Andreas Gabriel-Platschek <andi.platschek@gmail.com>
Signed-off-by: Andreas Gabriel-Platschek <andi.platschek@gmail.com>
Hi,
I had 2 small problems building and running libMicro on Debian Jessie, so I fixed them.
I did however not test it on any other distro / OS than Debian Jessie.
regards,
Andi