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

luasec: 'unsupported relocation type 10' error on powerpc #3319

Closed
maz-1 opened this issue Oct 9, 2016 · 3 comments
Closed

luasec: 'unsupported relocation type 10' error on powerpc #3319

maz-1 opened this issue Oct 9, 2016 · 3 comments

Comments

@maz-1
Copy link

maz-1 commented Oct 9, 2016

Maintainer: @MikePetullo
Environment: LEDE Reboot r0 ( WNDR4700, powerpc )

Description:
luasec cannot be built with libssp disabled, it complains about “undefined reference to `__stack_chk_fail_local’”
I modified luasec makefile and append -fno-stack-protector to CFLAGS. It builts after modification. But when i try to load ssl module, it gives errors:

Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)
> require “ssl” error loading module ‘ssl.core’ from file ‘/usr/lib/lua/ssl.so’:
      Error relocating /usr/lib/lua/ssl.so: unsupported relocation type 10
stack traceback:
      [C]: ?
      [C]: in function 'require'
      /usr/lib/lua/ssl.lua:7: in main chunk
      [C]: in function 'require'
      stdin:1: in main chunk
      [C]: ?

As @chunkeey has mentioned, replace -fPIC with -fpic in luasec makefile should solve the problem
https://bugs.lede-project.org/index.php?do=details&task_id=186
I can comfirm that it works

@diizzyy
Copy link
Contributor

diizzyy commented Mar 28, 2019

@maz-1
Is this still an issue and if so, can you do a PR?

@neheb
Copy link
Contributor

neheb commented Mar 28, 2019

neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Also removed warnings and O2 optimization to speed up build slightly and
slimming the build.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 2, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
thiagoricciardi pushed a commit to thiagoricciardi/packages that referenced this issue Apr 3, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 24, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
neheb added a commit to neheb/packages that referenced this issue Apr 24, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from cf23dd2)
neheb added a commit to neheb/packages that referenced this issue Apr 24, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from cf23dd2)
srchack pushed a commit to srchack/packages that referenced this issue Apr 25, 2019
Currently i386 and the PPC targets have issues linking issues.

openwrt#3319

says that replacing -fPIC with -fpic works.

Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
@neheb
Copy link
Contributor

neheb commented Jan 12, 2020

This is fixed.

@neheb neheb closed this as completed Jan 12, 2020
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