Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 201786
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Accessibility Team <accessibility@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Bernd Steinhauser <gentoo@bernd-steinhauser.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
flite-1.2-r1.ebuild.patch Workaround, that filters the flag patch Bernd Steinhauser 2007-12-09 18:24 0000 720 bytes Details | Diff
file_patch.diff Patch for 2 Makefiles that may fix the --as-needed bug patch Kent Fredric 2008-01-22 12:02 0000 3.14 KB Details | Diff
flite_error compile errors for flite 1.3 text/plain erik@2l8.nu 2008-01-25 16:24 0000 1.38 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 201786 depends on: Show dependency tree
Bug 201786 blocks: 129413
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-09 18:22 0000
app-accessability/flite will fail when --as-needed is defined in LDFLAGS,
removing it works:

gcc -march=k8 -O2 -pipe -msse3 -Wall    -o regexcomp regexcomp_main.o  -Wl,-O1
-Wl,--as-needed -L./lib -lflite -lm   -L../lib -lflite -lm
../lib/libflite.so: undefined reference to `sqrt'
../lib/libflite.so: undefined reference to `fmod'
../lib/libflite.so: undefined reference to `exp'
../lib/libflite.so: undefined reference to `sin'
../lib/libflite.so: undefined reference to `cos'
collect2: ld returned 1 exit status
make[1]: *** [regexcomp] Error 1
make: *** [.make_build_dirs] Error 2
 *
 * ERROR: app-accessibility/flite-1.2-r1 failed.
 * Call stack:
 *             ebuild.sh, line 1701:  Called dyn_compile
 *             ebuild.sh, line 1039:  Called qa_call 'src_compile'
 *             ebuild.sh, line   44:  Called src_compile
 *   flite-1.2-r1.ebuild, line   41:  Called die
 * The specific snippet of code:
 *      emake -j1 || die "Failed compilation"
 *  The die message:
 *   Failed compilation

Reproducible: Always

------- Comment #1 From Bernd Steinhauser 2007-12-09 18:24:09 0000 -------
Created an attachment (id=138112) [details]
Workaround, that filters the flag

This makes it compile.

------- Comment #2 From Jakub Moc (RETIRED) 2007-12-09 19:16:40 0000 -------
(From update of attachment 138112 [details])
That's just wrong solution... :)

------- Comment #3 From Kent Fredric 2008-01-22 12:02:28 0000 -------
Created an attachment (id=141574) [details]
Patch for 2 Makefiles that may fix the --as-needed bug

Managed to hack a few MAKEFILES and get this to work for me. Would make an
ebuild, but seeing i've done the hard work now to get it going (albeit a bit
nasty i think) you've got the easy job :)

I added a few more lines of output verbosity for debugging purposes, feel free
to remove them. ( this library does some magic which i deem to be weird (ie:
unpack an AR file to a dir and then recompile as a lib seems unusual to me, but
im no makefile guru or anything, i was simply _LUCKY_ enough to fix this myself
)

------- Comment #4 From William Hubbs 2008-01-24 05:42:21 0000 -------
I just found patches that made it possible to commit flite 1.3 to the tree. 
Can you please check the new version and see if this issue is still present?

Thanks much.

William

------- Comment #5 From Kent Fredric 2008-01-25 12:44:17 0000 -------
(In reply to comment #4)
> I just found patches that made it possible to commit flite 1.3 to the tree. 
> Can you please check the new version and see if this issue is still present?
> 
> Thanks much.
> 
> William
>

I can't even confirm if the --as-needed problem exists any more because of a
new bug that will have to get fixed before I'll be able to know. 

386-linux-gnu/obj/lang/cmu_us_kal16/cmu_us_kal16_res.os
i686-pc-linux-gnu-gcc -fPIC   -I../../lang/usenglish  -I../../lang/cmulex
-I../../include -O2 -march=native -pipe  -Wall    -c cmu_us_kal16_residx.c -o
../../build/i386-linux-gnu/obj/lang/cmu_us_kal16/cmu_us_kal16_residx.os
a - cmu_us_kal16_diphone.os
a - cmu_us_kal16.os
a - cmu_us_kal16_lpc.os
a - cmu_us_kal16_res.os
a - cmu_us_kal16_residx.os
making in lib ...
making libflite.so
making libflite_cmulex.so
/bin/sh: line 0: cd: shared_os: No such file or directory
make[1]: *** [libflite.so] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build/i386-linux-gnu/obj//.make_build_dirs] Error 2
 *

Having run through this code enough to know what "shared_os" is, im going
"huh?, somethings bust"

cos its doing this:


# Used in the lib/ directory and in building new voices
%.so: %.shared.a
        @ echo making $@
        @ rm -rf shared_os && mkdir shared_os
        @ rm -f $@ $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
        @ (cd shared_os && ar x ../$<)
        @ (cd shared_os && $(CC) -shared
-Wl,-soname,$@.${PROJECT_SHLIB_VERSION} -o ../$@.${PROJECT_VERSION} *.os -L../
$($(@:%.so=%_LDLIBS)))
        @ ln -s $@.${PROJECT_VERSION} $@.${PROJECT_SHLIB_VERSION}
        @ ln -s $@.${PROJECT_SHLIB_VERSION} $@
        @ rm -rf shared_os

strangely, when i cd into the directory, source
app-accesbility/flite/temp/environment,  and then hit make, seems to run fine. 

(( weird ))

------- Comment #6 From erik@2l8.nu 2008-01-25 16:24:25 0000 -------
Created an attachment (id=141774) [details]
compile errors for flite 1.3

I get this error while trying to emerge flite 1.3

------- Comment #7 From Dirk Heinrichs 2008-01-26 18:48:27 0000 -------
(In reply to comment #5)
> (In reply to comment #4)
> > I just found patches that made it possible to commit flite 1.3 to the tree. 
> > Can you please check the new version and see if this issue is still present?
> > 
> > Thanks much.
> > 
> > William
> >
> 
> I can't even confirm if the --as-needed problem exists any more because of a
> new bug that will have to get fixed before I'll be able to know. 
> 
> 386-linux-gnu/obj/lang/cmu_us_kal16/cmu_us_kal16_res.os
> i686-pc-linux-gnu-gcc -fPIC   -I../../lang/usenglish  -I../../lang/cmulex
> -I../../include -O2 -march=native -pipe  -Wall    -c cmu_us_kal16_residx.c -o
> ../../build/i386-linux-gnu/obj/lang/cmu_us_kal16/cmu_us_kal16_residx.os
> a - cmu_us_kal16_diphone.os
> a - cmu_us_kal16.os
> a - cmu_us_kal16_lpc.os
> a - cmu_us_kal16_res.os
> a - cmu_us_kal16_residx.os
> making in lib ...
> making libflite.so
> making libflite_cmulex.so
> /bin/sh: line 0: cd: shared_os: No such file or directory
> make[1]: *** [libflite.so] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [build/i386-linux-gnu/obj//.make_build_dirs] Error 2
>  *

This is solved by setting MAKEOPTS to "-j1". Seems flite 1.3 is not parallel
build save.

------- Comment #8 From William Hubbs 2008-01-26 20:37:23 0000 -------
I have changed the "emake" to "emake -j1" in the ebuild so that it will run
only one job.  Please check again and let me know if the issue with --as-needed
still exists.


Thanks much.

------- Comment #9 From Bernd Steinhauser 2008-01-26 21:14:16 0000 -------
Nope, problem solved.

But honestly, -j1 is just as bad as filtering --as-needed.
Judging by all the warnings the build spits out this is really some wicked
software. ;)

------- Comment #10 From Kent Fredric 2008-01-26 23:23:19 0000 -------
(In reply to comment #9)
> Nope, problem solved.
> 


Looks solved for me too with -j1. Its peculiar, becuase the place its bugging
in with parallel build hasn't changed since 1.2 as far as I can tell, unless of
course its running 2 instances of the 'library unpack and compile' phase in
parallel for some reason where it wasn't before. 

You could of course re-mangle the make file so that instead of creating
shared_os for every unpack, you could do shared_os_$(SOMEJOBSUFFIX) 

> But honestly, -j1 is just as bad as filtering --as-needed.

But admittedly, forcing a single threaded build instead of multi-threaded is
hardly something to complain about, unlike --as-needed which changes resultant
output and runtime significantly ;)

------- Comment #11 From William Hubbs 2008-03-06 14:37:31 0000 -------
I am closing this bug since it is fixed.

Thanks much for the report.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug