Raised This Month: $51 Target: $400
 12% 

_aligned_malloc must be available


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-14-2015 , 09:49   _aligned_malloc must be available
Reply With Quote #1

When I try to build my extensions I get this error:

Code:
In file included from ../SDK/hl2sdk/public/tier1/utlvector.h:23:0,
                 from ../SDK/hl2sdk/public/tier1/convar.h:21,
                 from ../SDK/hl2sdk/public/eiface.h:16,
                 from ../SDK/metamod-source/core/ISmmAPI.h:46,
                 from ../SDK/metamod-source/core/ISmmPlugin.h:39,
                 from sdk/smsdk_ext.h:99,
                 from sdk/smsdk_ext.cpp:34:
../SDK/hl2sdk/public/tier1/utlmemory.h: In constructor ‘CUtlMemoryAligned<T, nAlignment>::CUtlMemoryAligned(int, int)’:
../SDK/hl2sdk/public/tier1/utlmemory.h:771:96: error: there are no arguments to ‘_aligned_malloc’ that depend on a template parameter, so a declaration of ‘_aligned_malloc’ must be available [-fpermissive]
   CUtlMemory<T>::m_pMemory = (T*)_aligned_malloc( nInitAllocationCount * sizeof(T), nAlignment );
                                                                                                ^
../SDK/hl2sdk/public/tier1/utlmemory.h:771:96: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)

I use the latest SDK's (reconfigured for CS:S). gcc version 4.8.4; g++ version 4.8.4

When I build it under 5.0, I get this error during runtime:

Code:
undefined symbol: _ZSt24__throw_out_of_range_fmtPKcz

Last edited by kadet.89; 08-15-2015 at 07:45.
kadet.89 is offline
Send a message via Skype™ to kadet.89
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-16-2015 , 08:43   Re: _aligned_malloc must be available
Reply With Quote #2

I've reinstalled ubuntu (Ubuntu 14.04.2 mate 64bit) and tryed to build the example sample_mm

here all my steps:

Code:
sudo apt-get install git
git clone --recursive https://github.com/alliedmodders/sourcemod.git
git clone https://github.com/alliedmodders/metamod-source.git
git clone https://github.com/alliedmodders/hl2sdk.git
git checkout css

apt get install gcc
apt get install gcc-multilib
apt get install g++
apt get install g++-multilib

apt get install make
make ENGINE=css
I still got this error message. Did I miss something, or I did something wrong?
AfaIk _aligned_malloc is windows function, why does it want to use it?

Last edited by kadet.89; 08-16-2015 at 08:44.
kadet.89 is offline
Send a message via Skype™ to kadet.89
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-16-2015 , 09:04   Re: _aligned_malloc must be available
Reply With Quote #3

use AMBuild, the makefiles haven't been updated in a while so they are not told to use c++11 which has the missing function included in linux
__________________

Last edited by WildCard65; 08-16-2015 at 09:05.
WildCard65 is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-16-2015 , 09:27   Re: _aligned_malloc must be available
Reply With Quote #4

Can you give me a link to the instruction? Is _aligned_malloc really a c++11 thing?

Last edited by kadet.89; 08-16-2015 at 09:35.
kadet.89 is offline
Send a message via Skype™ to kadet.89
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-16-2015 , 10:14   Re: _aligned_malloc must be available
Reply With Quote #5

SM 1.8's sample extension has a sample AMBuildScript you can use
__________________
WildCard65 is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-16-2015 , 10:48   Re: _aligned_malloc must be available
Reply With Quote #6

Is there an instruction on how to install and use AMBuild ?
kadet.89 is offline
Send a message via Skype™ to kadet.89
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-16-2015 , 11:43   Re: _aligned_malloc must be available
Reply With Quote #7

Clone AMBuild from github.com/alliedmodders/ambuild and then run:
python setup.py build
python setup.py install --user

Location of AMBuild install will most likely be ~/.local/bin

Also edit the ambuildscripts so they work for your extension
__________________

Last edited by WildCard65; 08-16-2015 at 11:44.
WildCard65 is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-16-2015 , 12:06   Re: _aligned_malloc must be available
Reply With Quote #8

PHP Code:
/home/ubuntu-user/EXTENSIONS/SDK/sourcemod/extensions/taunts/sdk/smsdk_ext.h:41:27fatal errorIExtensionSys.hThe file not found
 
#include <IExtensionSys.h> 
How to include the dirrectory to the AMBuild file?

Last edited by kadet.89; 08-16-2015 at 12:14.
kadet.89 is offline
Send a message via Skype™ to kadet.89
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 08-16-2015 , 14:17   Re: _aligned_malloc must be available
Reply With Quote #9

As long as AMBuildScript can find the SM directory, it should find the file(you may need to edit the paths to the SP stuff)
__________________

Last edited by WildCard65; 08-16-2015 at 14:17.
WildCard65 is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 08-18-2015 , 13:01   Re: _aligned_malloc must be available
Reply With Quote #10

I can't find the file with this path. How to set the directory?
kadet.89 is offline
Send a message via Skype™ to kadet.89
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode