logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Building & Member Downloads View previous topic :: View next topic
Reply to topic   Topic: fatal error LNK1181: cannot open input file 'lua51.lib'
Author
SolidSnakeGTI



Joined: 16 May 2012
Posts: 16

PostPosted: Mon 25 Jun '12 15:31    Post subject: fatal error LNK1181: cannot open input file 'lua51.lib' Reply with quote

Trying to compile Apache 2.4.2 on Windows 7 using Visual Studio 9 2008, but unfortunately I've this error & build failed:
fatal error LNK1181: cannot open input file 'lua51.lib'
I'm using official sources, including lua from here:
http://sourceforge.net/projects/luabinaries/files/5.2/Windows%20Libraries/Dynamic/lua-5.2_Win32_dllw4_lib.zip/download

Note: compilation succeed without lua, but fail with it.

Anyone can suggest any fixes?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 25 Jun '12 16:06    Post subject: Reply with quote

You downloaded lua 5.2 but need 5.1 Wink
Back to top
SolidSnakeGTI



Joined: 16 May 2012
Posts: 16

PostPosted: Mon 25 Jun '12 16:37    Post subject: Reply with quote

Oops!! Embarassed
Fixed it, and now getting the following many errors:
Code:
41>   Creating library .\Release/mod_socache_memcache.lib and object .\Release/mod_socache_memcache.exp
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_pstrdup@8 referenced in function _socache_mc_create
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_palloc@8 referenced in function _socache_mc_create
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_pstrcat referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_add_server@8 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_parse_addr_port@20 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_server_create@32 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__ap_log_error_ referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_create@16 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_strtok@12 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__ap_mpm_query@8 referenced in function _socache_mc_init
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_snprintf referenced in function _socache_mc_id2key
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_cpystrn@12 referenced in function _socache_mc_id2key
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_set@24 referenced in function _socache_mc_store
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_getp@24 referenced in function _socache_mc_retrieve
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__apr_memcache_delete@12 referenced in function _socache_mc_remove
41>mod_socache_memcache.obj : error LNK2019: unresolved external symbol __imp__ap_register_provider@20 referenced in function _register_hooks
41>.\Release\mod_socache_memcache.so : fatal error LNK1120: 16 unresolved externals
41>Build log was saved at "file://C:\z\httpd-2.4.2lua\modules\cache\Release\BuildLog.htm"
41>mod_socache_memcache - 17 error(s), 0 warning(s)


Tried every possible way I can reach, anyone has correct steps on how to compile apache 2.4 with mod_lua please?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 26 Jun '12 5:10    Post subject: Reply with quote

the errors are all for mod_socache_memcache, not mod_lua

Looks like you're missing apr & apr-util
Back to top
SolidSnakeGTI



Joined: 16 May 2012
Posts: 16

PostPosted: Tue 26 Jun '12 7:43    Post subject: Reply with quote

Both apr & apr-util exists!
Additionally these errors only appears when including lua stuff!! Otherwise it's OK & build succeed!!!
Any suggestions?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 26 Jun '12 8:42    Post subject: Reply with quote

You may have apr & apr-util, but if the libs do not build, then they cannot be linked to.

I do not know, seem wonky as I do not have a problem and considering each module is a separate project, mod_lua barfing shouldn't hurt anything else.

but if libhttpd, apr, apr-uril do not build, almost nothing will. I also see ap_* calls not being referenced either, so libhttpd project failed as well. This points me in the direction of believing you did not run the cvtdsp.pl on the source first.

but yet you say w/o mod_lua all is well.

What VC++ version you using? (looks like VC9 to me)

Another thing, you might want to set VC++ to only build one thing at a time, the default is 2 but I always change it to 1, it makes for easier reading of the build log and I have had troubles in the past with it set at 2 (something tried to build before a dependency was present, which shouldn't happen).

Here's an easy to read build log when set to 1 thing at a time:
https://www.apachehaus.net/misc/apache-242-buildlog.txt

Here's where the setting is:
https://www.apachehaus.net/misc/vc-parallel.gif
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Jun '12 10:06    Post subject: Reply with quote

glsmith wrote:

What VC++ version you using? (looks like VC9 to me)


SolidSnakeGTI wrote:

Trying to compile Apache 2.4.2 on Windows 7 using Visual Studio 9 2008,


I think you should clean the build before compiling again.


Next time, you can also compile lua yourself
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 26 Jun '12 10:51    Post subject: Reply with quote

Ooops .. I missed that .. Express Version? It matters on a few things.
Back to top
SolidSnakeGTI



Joined: 16 May 2012
Posts: 16

PostPosted: Tue 26 Jun '12 16:31    Post subject: Reply with quote



Any suggestions ...?!
Back to top
SolidSnakeGTI



Joined: 16 May 2012
Posts: 16

PostPosted: Tue 26 Jun '12 17:06    Post subject: Reply with quote

My latest buildlog:
http://pastebin.com/VP7Nv8Zr
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 26 Jun '12 20:18    Post subject: Reply with quote

ok, lua is barfing with
LINK : fatal error LNK1181: cannot open input file 'lua51.lib'
so it's not finding the lib

make sure there is a lua51.lib & lua51.dll located in
srclib/lua/src

If there is it could be corrupted or is an x64 binary since you're on Win7 and not a 32bit one. Cannot link 64 bit libs to 32 bit modules.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Jun '12 23:19    Post subject: Reply with quote

I think it is missing those file.

Quote:

make sure there is a lua51.lib & lua51.dll located in
srclib/lua/src


I think they need to be in srclib/lua That is why I copy the files after compiling.

Code:

etc\luavs
copy /y src\*.* .\


by the way. Do you use lua scripts?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 27 Jun '12 3:45    Post subject: Reply with quote

James Blond wrote:
I think it is missing those file.

I think they need to be in srclib/lua That is why I copy the files after compiling.


No need for mod_lua, I used to do that (and still do, copy src folder to lua root) because of something else at the time forget what exactly, maybe when we were at 2.3.low_number.

from mod_lua.dsp these days;
cl: /I "../../srclib/lua/src"
link: /libpath:"../../srclib/lua/src"

I'm thinking it's an x64 lib since IIRC the command line wants to build x64 by default on an x64 machine.
Back to top


Reply to topic   Topic: fatal error LNK1181: cannot open input file 'lua51.lib' View previous topic :: View next topic
Post new topic   Forum Index -> Building & Member Downloads