Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MODULE.TARGET.SHARED_LIBRARIES.libjpeg already defined error

I am trying to build kernel for AOSP 4.4.2 for a device. When I compile the kernel I get

build/core/base_rules.mk:134: *** vendor/google/libs: 
MODULE.TARGET.SHARED_LIBRARIES.libjpeg already defined by external/jpeg.  Stop.

I understand that the shared variable libjpeg is already defined and I need to remove one of them. Is that correct?

I tried looking in external/jpeg folder and I am not sure which file I have to look into. Could some one please tell me how to deal with this situation.

like image 923
ChanChow Avatar asked Aug 25 '14 00:08

ChanChow


2 Answers

The error states that the Shared object libjpeg is already defined in other module google/libs and you are again trying to create it. So just try to rename the Android.mk file in google/libs folder or in external/jpeg folder. It fixes the issue.

like image 160
DOSKrupp Avatar answered Oct 02 '22 14:10

DOSKrupp


I had encountered your error but the solution was not to change any Makefile or source. Simply I had forgotten to run environment setup script(in may AOSP tree: build/envsetup.sh) After running that, no error happens.

like image 41
Saleh Avatar answered Oct 02 '22 16:10

Saleh