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

1.3-dev1 fails to build on 64-bit #42

Closed
nalimilan opened this issue Jun 3, 2015 · 4 comments
Closed

1.3-dev1 fails to build on 64-bit #42

nalimilan opened this issue Jun 3, 2015 · 4 comments

Comments

@nalimilan
Copy link
Member

I see this only on 64-bit Fedora/RHEL builds. 32-bit builds went fine.

make -j2 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c -o utf8proc.o utf8proc.c
rm -f libutf8proc.a
cc  -shared -o libutf8proc.so.1.3.0 -Wl,-soname -Wl,libutf8proc.so.1 utf8proc.o
ar rs libutf8proc.a utf8proc.o
ar: creating libutf8proc.a
/usr/bin/ld: utf8proc.o: relocation R_X86_64_PC32 against symbol `utf8proc_stage1table' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:65: recipe for target 'libutf8proc.so.1.3.0' failed
make: *** [libutf8proc.so.1.3.0] Error 1

https://copr-be.cloud.fedoraproject.org/results/nalimilan/julia-nightlies/fedora-rawhide-x86_64/utf8proc-1.3-0.dev1.fc23/build.log.gz

I actually don't need the static library, but this makes the whole build fail (make install depends on it).

@tkelman
Copy link
Contributor

tkelman commented Jun 3, 2015

Can you reproduce this locally and bisect?

@tkelman
Copy link
Contributor

tkelman commented Jun 3, 2015

Nevermind, it's almost certainly 3a6fc5b - the flags moved around so you probably need to do -fPIC explicitly on the buildbot now. You could try the cmake script, I think that should do the right thing with -fPIC.

@stevengj
Copy link
Member

stevengj commented Jun 3, 2015

Possibly we should do something like:

CFLAGS ?= -O2 ....
PICFLAG = -fPIC
C99FLAG = -std=c99
UCFLAGS = $(CFLAGS) $(PICFLAG) $(C99FLAG) -DUTFPROC_EXPORTS

and then use $(UCFLAGS) when compiling. This way, you can do make CFLAGS=... and similar without screwing up the PIC or C99 flags.

nalimilan added a commit that referenced this issue Jun 7, 2015
@nalimilan
Copy link
Member Author

Agreed. See PR #43.

nalimilan added a commit that referenced this issue Jun 8, 2015
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